记得上下班打卡 | git大法好,push需谨慎

Commit 5d744f96 authored by 胡佳晨's avatar 胡佳晨

修改 迁移数据审核bug

parent 3cf23604
......@@ -230,11 +230,11 @@ public class DataImpl {
//演出所属账号修改
public void account() {
try {
String sql = "select merchant_id, mm.mobile, kp.performances_id\n" +
String sql = "select merchant_id, mm.mobile, kp.performances_id ,kps.audit_status\n" +
"from kylin_performances kp\n" +
" inner join kylin_performance_relations kpr on kpr.performance_id = kp.performances_id\n" +
" left join " + PHP_DB + ".merchants mm on mm.id = kpr.merchant_id\n" +
"group by mm.mobile";
" inner join kylin_performance_status kps on kps.performance_id = kp.performances_id\n"+
" left join " + PHP_DB + ".merchants mm on mm.id = kpr.merchant_id";
Connection connection = DriverManager.getConnection(SQL_URL, SQL_USER, SQL_PWD);
//查询数据
PreparedStatement preparedStatement = connection.prepareStatement(sql);
......@@ -243,6 +243,8 @@ public class DataImpl {
while (row.next()) {
String mobile = row.getString("mobile");
String merchantId = row.getString("merchant_id");
String performancesId = row.getString("performances_id");
String auditStatus = row.getString("audit_status");
if (mobile == null) {
continue;
} else {
......@@ -262,23 +264,24 @@ public class DataImpl {
KylinPerformanceRelations kylinPerformanceRelations = KylinPerformanceRelations.getNew();
kylinPerformanceRelations.setMerchantId(uid);
kylinPerformanceRelationsMapper.update(kylinPerformanceRelations,
Wrappers.lambdaUpdate(KylinPerformanceRelations.class).eq(KylinPerformanceRelations::getMerchantId, merchantId));
Wrappers.lambdaUpdate(KylinPerformanceRelations.class).eq(KylinPerformanceRelations::getMerchantId, merchantId).eq(KylinPerformanceRelations::getPerformanceId,performancesId));
HashMap<String, Object> map = CollectionUtil.mapStringObject();
map.put("merchantId", uid);
map.put("auditStatus",auditStatus);
//修改vo
Query voQuery = Query.query(Criteria.where("merchantId").is(merchantId));
Query voQuery = Query.query(Criteria.where("performancesId").is(performancesId));
BasicDBObject objectVo = ObjectUtil.cloneBasicDBObject().append("$set", mongoConverter.convertToMongoType(map));
mongoTemplate.getCollection(KylinPerformanceVo.class.getSimpleName()).updateMany(
mongoTemplate.getCollection(KylinPerformanceVo.class.getSimpleName()).updateOne(
voQuery.getQueryObject(),
objectVo
);
//修改partnerVo
Query partnerVoQuery = Query.query(Criteria.where("merchantId").is(merchantId));
BasicDBObject objectPartnerVo = ObjectUtil.cloneBasicDBObject().append("$set", mongoConverter.convertToMongoType(map));
mongoTemplate.getCollection(PerformancePartnerVo.class.getSimpleName()).updateMany(
partnerVoQuery.getQueryObject(),
objectPartnerVo
// Query partnerVoQuery = Query.query(Criteria.where("merchantId").is(merchantId).and("performancesId").is(performancesId));
// BasicDBObject objectPartnerVo = ObjectUtil.cloneBasicDBObject().append("$set", mongoConverter.convertToMongoType(map));
mongoTemplate.getCollection(PerformancePartnerVo.class.getSimpleName()).updateOne(
voQuery.getQueryObject(),
objectVo
);
initPermission("sponsor", uid, row.getString("performances_id"), null, null, null, null);
}
......
......@@ -449,7 +449,7 @@ public class KylinPerformancesPartnerServiceImpl implements IKylinPerformancesPa
//快递相关
KylinTicketExpressModuleVo moduleVo = redisSlimeUtils.getTEMMerchantVo(ticketItem.getTicketsId());
if (moduleVo != null) {
if (moduleVo != null && moduleVo.getProduceCodeList()!=null) {
redisSlimeUtils.setTEMVo(ticketItem.getTicketsId(), moduleVo);
sqlsDataE.add(new Object[]{ticketItem.getTicketsId(), now});
for (ExpressModuleVo mVo : moduleVo.getProduceCodeList())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment