Commit d1605e23 by 徐高华

Merge branch 'developer' of http://git.gicdev.com/haoban3.0/haoban-manage3.0.git into developer

parents da1e1f40 b4ef70e4
......@@ -142,48 +142,23 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
return null;
}
List<StaffClerkInfoDTO> infoDTOS = EntityUtil.changeEntityListByJSON(StaffClerkInfoDTO.class, list);
Map<String, String> nameMap = new HashMap<>();
infoDTOS.forEach(infoDTO -> {
//企业
if (!nameMap.containsKey(infoDTO.getEnterpriseId())) {
EnterpriseDTO enterpriseDTO = enterpriseService.getEnterpriseById(infoDTO.getEnterpriseId());
if (null != enterpriseDTO) {
nameMap.put(infoDTO.getEnterpriseId(), enterpriseDTO.getEnterpriseName() + "_" + enterpriseDTO.getBrandName());
} else {
nameMap.put(infoDTO.getEnterpriseId(), "未知商户");
}
}
//门店店员名称
if (!nameMap.containsKey(infoDTO.getClerkId())) {
ClerkDTO clerkDTO = clerkService.getClerkByClerkId(infoDTO.getClerkId());
if (null != clerkDTO) {
nameMap.put(infoDTO.getClerkId(), clerkDTO.getClerkName());
nameMap.put(infoDTO.getStoreId(), clerkDTO.getStoreName());
infoDTO.setClerkPhoneNumber(clerkDTO.getPhoneNumber());
} else {
nameMap.put(infoDTO.getClerkId(), "未知店员");
}
EnterpriseDTO enterpriseDTO = enterpriseService.getEnterpriseById(infoDTO.getEnterpriseId());
if (enterpriseDTO != null) {
infoDTO.setBrandName(enterpriseDTO.getBrandName());
infoDTO.setEnterpriseName(enterpriseDTO.getEnterpriseName());
}
//门店店员名称
if (!nameMap.containsKey(infoDTO.getStoreId())) {
StoreDTO storeDTO = storeService.getStore(infoDTO.getStoreId());
if (null != storeDTO) {
nameMap.put(infoDTO.getStoreId(), storeDTO.getStoreName());
} else {
nameMap.put(infoDTO.getStoreId(), "未知门店");
}
ClerkDTO clerkDTO = clerkService.getClerkByClerkId(infoDTO.getClerkId(),-1);
if (null != clerkDTO) {
infoDTO.setClerkPhoneNumber(clerkDTO.getPhoneNumber());
infoDTO.setClerkName(clerkDTO.getClerkName());
infoDTO.setClerkCode(clerkDTO.getClerkCode());
}
infoDTO.setClerkName(nameMap.get(infoDTO.getClerkId()));
infoDTO.setStoreName(nameMap.get(infoDTO.getStoreId()));
if ((nameMap.get(infoDTO.getEnterpriseId())) != null) {
String enterpriseAndBrandName = nameMap.get(infoDTO.getEnterpriseId());
String[] split = enterpriseAndBrandName.split("_");
infoDTO.setEnterpriseName(split[0]);
if (split[1] != null) {
infoDTO.setBrandName(split[1]);
}
StoreDTO storeDTO = storeService.getStore(infoDTO.getStoreId());
if (null != storeDTO) {
infoDTO.setStoreName(storeDTO.getStoreName());
}
});
return infoDTOS;
......
......@@ -311,7 +311,14 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
//操作日志
updateSystemLog(hmQrcodeQDTO, hmId);
String welcomeId = hmQrcodeQDTO.getWelcomeId();
if (StringUtils.isBlank(welcomeId)){
hmQrcodeQDTO.setWelcomeId("");
}
String memberLabelId = hmQrcodeQDTO.getMemberLabelId();
if (StringUtils.isBlank(memberLabelId)){
hmQrcodeQDTO.setMemberLabelId("");
}
int updateResult = hmQrcodeService.update(hmQrcodeQDTO);
if (updateResult == 1) {
// 更新欢迎语引用次数
......
......@@ -177,13 +177,13 @@
<if test="updateTime != null">
update_time = #{updateTime},
</if>
<if test="memberLabelId != null and memberLabelId != ''">
<if test="memberLabelId != null">
member_label_id = #{memberLabelId},
</if>
<if test="passFlag != null">
pass_flag = #{passFlag},
</if>
<if test="welcomeId != null and welcomeId != ''">
<if test="welcomeId != null">
welcome_id = #{welcomeId},
</if>
<if test="statusFlag != null">
......
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