fix
This commit is contained in:
@@ -6,6 +6,7 @@ import com.cool.store.context.LoginUserInfo;
|
||||
import com.cool.store.dao.EnterpriseUserDAO;
|
||||
import com.cool.store.dao.RegionDao;
|
||||
import com.cool.store.dao.ShopStageInfoDAO;
|
||||
import com.cool.store.entity.EnterpriseUserDO;
|
||||
import com.cool.store.entity.LicenseTransactDO;
|
||||
import com.cool.store.entity.ShopAuditInfoDO;
|
||||
import com.cool.store.enums.AuditTypeEnum;
|
||||
@@ -13,6 +14,7 @@ import com.cool.store.enums.ErrorCodeEnum;
|
||||
import com.cool.store.enums.point.ShopSubStageStatusEnum;
|
||||
import com.cool.store.exception.ServiceException;
|
||||
import com.cool.store.mapper.ApplyLicenseMapper;
|
||||
import com.cool.store.mapper.EnterpriseUserMapper;
|
||||
import com.cool.store.mapper.ShopAuditInfoMapper;
|
||||
import com.cool.store.request.LicenseListRequest;
|
||||
import com.cool.store.request.SubmitLicenseRequest;
|
||||
@@ -30,6 +32,7 @@ import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Service
|
||||
@Slf4j
|
||||
@@ -53,6 +56,9 @@ public class ApplyLicenseServiceImpl implements ApplyLicenseService {
|
||||
@Resource
|
||||
ShopStageInfoDAO shopStageInfoDAO;
|
||||
|
||||
@Resource
|
||||
EnterpriseUserMapper userMapper;
|
||||
|
||||
@Override
|
||||
public Boolean submitLicense(SubmitLicenseRequest request) {
|
||||
log.info("submitLicense request:{}", JSONObject.toJSONString(request));
|
||||
@@ -91,6 +97,12 @@ public class ApplyLicenseServiceImpl implements ApplyLicenseService {
|
||||
}
|
||||
SubmitLicenseResponse submitLicenseResponse = SubmitLicenseResponse.from(result);
|
||||
List<ShopAuditInfoDO> listByShopIdAndType = shopAuditInfoMapper.getListByShopIdAndType(shopId, AuditTypeEnum.LICENSE_APPROVAL.getCode());
|
||||
List<String> userIds = listByShopIdAndType.stream().map(ShopAuditInfoDO::getSubmittedUserId).collect(Collectors.toList());
|
||||
List<EnterpriseUserDO> userInfoByUserIds = userMapper.getUserInfoByUserIds(userIds);
|
||||
Map<String, String> userAvatarMap = userInfoByUserIds.stream().collect(Collectors.toMap(k -> k.getUserId(), v -> v.getAvatar()));
|
||||
listByShopIdAndType.stream().forEach( item -> {
|
||||
item.setAvatar(userAvatarMap.get(item.getSubmittedUserId()));
|
||||
});
|
||||
submitLicenseResponse.setProcessRecords(listByShopIdAndType);
|
||||
return submitLicenseResponse;
|
||||
}
|
||||
|
||||
@@ -170,6 +170,7 @@ public class SysStoreAppServiceImpl implements SysStoreAppService,AuditResultSer
|
||||
franInfo.setInviteUserId(systemBuildingShopDO.getStoreInviteesId());
|
||||
storeDetail.setStoreNature(systemBuildingShopDO.getStoreNature());
|
||||
storeDetail.setStoreOperator(systemBuildingShopDO.getStoreOperator());
|
||||
storeDetail.setStoreName(systemBuildingShopDO.getStoreName());
|
||||
// bigDesc
|
||||
storeDetail.setBigDesc(systemBuildingShopDO.getBigDesc());
|
||||
// fightDesc
|
||||
@@ -238,6 +239,7 @@ public class SysStoreAppServiceImpl implements SysStoreAppService,AuditResultSer
|
||||
storeDetail.setDistrict(pointInfoDO.getDistrict());
|
||||
storeDetail.setTownship(pointInfoDO.getTownship());
|
||||
storeDetail.setDetailAddress(pointInfoDO.getAddress());
|
||||
storeDetail.setStoreName(pointInfoDO.getPointName());
|
||||
|
||||
}
|
||||
sysStoreAppResponse.setStoreDetail(storeDetail);
|
||||
|
||||
Reference in New Issue
Block a user