Commit 82c00ed5 authored by 廖旭伟's avatar 廖旭伟

测试bug修改

parent 9aedbabd
Pipeline #2981 failed with stages
......@@ -15,6 +15,7 @@ import com.mortals.framework.model.Result;
import com.mortals.framework.utils.BeanUtil;
import com.mortals.framework.web.BaseJsonBodyController;
import com.mortals.xhx.common.key.Constant;
import com.mortals.xhx.common.utils.StringUtils;
import com.mortals.xhx.module.datum.model.DatumInfoFieldEntity;
import com.mortals.xhx.module.datum.model.DatumInfoFieldQuery;
import com.mortals.xhx.module.datum.service.DatumInfoFieldService;
......@@ -317,8 +318,8 @@ public class WeChatMiniProgramController extends BaseJsonBodyController {
initEntity.setOpenId(wechatInfo.getOpenid());
initEntity.setMobile(wechatInfo.getEnphone());
initEntity.setIdCard(wechatInfo.getEnidcard());
this.userFillHistoryService.save(initEntity, context);
}
this.userFillHistoryService.save(initEntity, context);
} else {
entity.setUpdateTime(new Date());
entity.setUpdateUserId(1L);
......@@ -368,16 +369,24 @@ public class WeChatMiniProgramController extends BaseJsonBodyController {
String phpUrl = phpServer + ACTION;
WechatInfo wechatInfo = WechatInfoUtil.getWxInfo(phpUrl, authtoken);
if(wechatInfo!=null){
log.info("微信用户信息:{}",JSONObject.toJSONString(wechatInfo));
DatumInfoFieldQuery datumInfoFieldQuery = new DatumInfoFieldQuery();
datumInfoFieldQuery.setMatterId(entity.getMatterId());
datumInfoFieldQuery.setMaterialId(entity.getId());
String openId = wechatInfo.getOpenid();
String mobile = wechatInfo.getEnphone();
String idCard = wechatInfo.getEnidcard();
datumInfoFieldQuery.setOrConditionList(Arrays.asList(new DatumInfoFieldQuery().openId(openId),new DatumInfoFieldQuery().mobile(mobile),new DatumInfoFieldQuery().idCard(idCard)));
datumInfoFieldQuery.setOrderColList(Arrays.asList(new OrderCol("createTime", OrderCol.DESCENDING)));
if(StringUtils.isNotEmpty(openId)){
datumInfoFieldQuery.setOpenId(openId);
}else if(StringUtils.isNotEmpty(mobile)){
datumInfoFieldQuery.setMobile(mobile);
}else if(StringUtils.isNotEmpty(idCard)){
datumInfoFieldQuery.setIdCard(idCard);
}
List<DatumInfoFieldEntity> fieldEntities = datumInfoFieldService.find(datumInfoFieldQuery);
if(CollectionUtils.isNotEmpty(fieldEntities)){
log.info("微信用户数字资产查询条件:{}",JSONObject.toJSONString(datumInfoFieldQuery));
log.info("微信用户数字资产记录数:{}",fieldEntities.size());
Map<String,String> fieldMap = fieldEntities.stream().collect(Collectors.toMap(x -> x.getFieldCode(), y -> y.getFieldValue(), (o, n) -> n));
JSONObject formTemplate = JSONObject.parseObject(entity.getFormContent());
JSONArray formList = formTemplate.getJSONArray("list");
......
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