头像实体转换
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
package com.cool.store.mapper;
|
package com.cool.store.mapper;
|
||||||
|
|
||||||
import com.cool.store.entity.ShopAuditInfoDO;
|
import com.cool.store.entity.ShopAuditInfoDO;
|
||||||
|
import com.cool.store.vo.ShopAuditInfoVO;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
import tk.mybatis.mapper.common.Mapper;
|
import tk.mybatis.mapper.common.Mapper;
|
||||||
|
|
||||||
@@ -12,7 +13,7 @@ public interface ShopAuditInfoMapper extends Mapper<ShopAuditInfoDO> {
|
|||||||
|
|
||||||
List<ShopAuditInfoDO> getAuditInfoList(@Param("auditIds") List<Long> auditIds);
|
List<ShopAuditInfoDO> getAuditInfoList(@Param("auditIds") List<Long> auditIds);
|
||||||
|
|
||||||
List<ShopAuditInfoDO> getListByShopIdAndType(@Param("shopId") Long shopId,
|
List<ShopAuditInfoVO> getListByShopIdAndType(@Param("shopId") Long shopId,
|
||||||
@Param("type") Integer type);
|
@Param("type") Integer type);
|
||||||
/**
|
/**
|
||||||
* @Auther: wangshuo
|
* @Auther: wangshuo
|
||||||
|
|||||||
@@ -47,8 +47,9 @@
|
|||||||
where
|
where
|
||||||
shop_id = #{shopId} and deleted = 0
|
shop_id = #{shopId} and deleted = 0
|
||||||
</select>
|
</select>
|
||||||
<select id="getListByShopIdAndType" resultType="com.cool.store.entity.ShopAuditInfoDO">
|
<select id="getListByShopIdAndType" resultType="com.cool.store.vo.ShopAuditInfoVO">
|
||||||
select * from xfsg_shop_audit_info
|
select <include refid="Base_Column_List"/>
|
||||||
|
from xfsg_shop_audit_info
|
||||||
where shop_id = #{shopId}
|
where shop_id = #{shopId}
|
||||||
and audit_type = #{type}
|
and audit_type = #{type}
|
||||||
order by create_time
|
order by create_time
|
||||||
|
|||||||
@@ -1,11 +1,8 @@
|
|||||||
package com.cool.store.response;
|
package com.cool.store.response;
|
||||||
|
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import io.swagger.models.auth.In;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.text.SimpleDateFormat;
|
|
||||||
import java.util.Date;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@@ -19,7 +16,7 @@ public class AuditDetailResponse {
|
|||||||
private String endTime;
|
private String endTime;
|
||||||
|
|
||||||
private String checkUser;
|
private String checkUser;
|
||||||
|
@ApiModelProperty("稽核时间")
|
||||||
private String checkTime;
|
private String checkTime;
|
||||||
|
|
||||||
private Integer checkStatus;
|
private Integer checkStatus;
|
||||||
@@ -27,6 +24,4 @@ public class AuditDetailResponse {
|
|||||||
private String checkResult;
|
private String checkResult;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package com.cool.store.response;
|
|||||||
|
|
||||||
import com.cool.store.entity.LicenseTransactDO;
|
import com.cool.store.entity.LicenseTransactDO;
|
||||||
import com.cool.store.entity.ShopAuditInfoDO;
|
import com.cool.store.entity.ShopAuditInfoDO;
|
||||||
|
import com.cool.store.vo.ShopAuditInfoVO;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@@ -86,7 +87,7 @@ public class SubmitLicenseResponse {
|
|||||||
private Integer submitStatus;
|
private Integer submitStatus;
|
||||||
|
|
||||||
@ApiModelProperty("流程记录")
|
@ApiModelProperty("流程记录")
|
||||||
private List<ShopAuditInfoDO> processRecords;
|
private List<ShopAuditInfoVO> processRecords;
|
||||||
|
|
||||||
public static SubmitLicenseResponse from(LicenseTransactDO licenseTransactDO) {
|
public static SubmitLicenseResponse from(LicenseTransactDO licenseTransactDO) {
|
||||||
if (licenseTransactDO == null) {
|
if (licenseTransactDO == null) {
|
||||||
|
|||||||
@@ -0,0 +1,59 @@
|
|||||||
|
package com.cool.store.vo;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
@Data
|
||||||
|
public class ShopAuditInfoVO {
|
||||||
|
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
private Long shopId;
|
||||||
|
|
||||||
|
@ApiModelProperty("'0-视觉验收 1-培训登记审批 2-开业运营方案 3-证照审批 4-系统建店5-三方验收")
|
||||||
|
private Integer auditType;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty("提交人ID")
|
||||||
|
private String submittedUserId;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty("提交人名称")
|
||||||
|
private String submittedUserName;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty("结果类型 0通过,1拒绝")
|
||||||
|
private Integer resultType;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty("通过原因")
|
||||||
|
private String passReason;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty("拒绝原因")
|
||||||
|
private String rejectReason;
|
||||||
|
|
||||||
|
|
||||||
|
private String certifyFile;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty("时间")
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否删除:0.否 1.是
|
||||||
|
*/
|
||||||
|
private Boolean deleted;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty("数据类型 0-提交 1-审批")
|
||||||
|
private Integer dataType;
|
||||||
|
|
||||||
|
@ApiModelProperty("头像")
|
||||||
|
private String avatar;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -25,6 +25,7 @@ import com.cool.store.service.RegionService;
|
|||||||
import com.cool.store.utils.StringUtil;
|
import com.cool.store.utils.StringUtil;
|
||||||
import com.cool.store.utils.poi.constant.Constants;
|
import com.cool.store.utils.poi.constant.Constants;
|
||||||
import com.cool.store.vo.OpenAcceptanceInfoListVO;
|
import com.cool.store.vo.OpenAcceptanceInfoListVO;
|
||||||
|
import com.cool.store.vo.ShopAuditInfoVO;
|
||||||
import com.github.pagehelper.PageHelper;
|
import com.github.pagehelper.PageHelper;
|
||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
@@ -99,18 +100,19 @@ public class ApplyLicenseServiceImpl implements ApplyLicenseService {
|
|||||||
throw new ServiceException(ErrorCodeEnum.LICENSE_NOT_EXIST);
|
throw new ServiceException(ErrorCodeEnum.LICENSE_NOT_EXIST);
|
||||||
}
|
}
|
||||||
SubmitLicenseResponse submitLicenseResponse = SubmitLicenseResponse.from(result);
|
SubmitLicenseResponse submitLicenseResponse = SubmitLicenseResponse.from(result);
|
||||||
List<ShopAuditInfoDO> listByShopIdAndType = shopAuditInfoMapper.getListByShopIdAndType(shopId, AuditTypeEnum.LICENSE_APPROVAL.getCode());
|
List<ShopAuditInfoVO> listByShopIdAndType = shopAuditInfoMapper.getListByShopIdAndType(shopId, AuditTypeEnum.LICENSE_APPROVAL.getCode());
|
||||||
List<String> userIds = listByShopIdAndType.stream().map(ShopAuditInfoDO::getSubmittedUserId).collect(Collectors.toList());
|
List<String> userIds = listByShopIdAndType.stream().map(ShopAuditInfoVO::getSubmittedUserId).collect(Collectors.toList());
|
||||||
List<EnterpriseUserDO> userInfoByUserIds = new ArrayList<>();
|
List<EnterpriseUserDO> userInfoByUserIds = new ArrayList<>();
|
||||||
// if (CollectionUtils.isNotEmpty(userIds)){
|
|
||||||
// userInfoByUserIds = userMapper.getUserInfoByUserIds(userIds);
|
if (CollectionUtils.isNotEmpty(userIds)){
|
||||||
// Map<String, String> userAvatarMap = userInfoByUserIds.stream()
|
userInfoByUserIds = userMapper.getUserInfoByUserIds(userIds);
|
||||||
// .filter(item -> StringUtil.isNotBlank(item.getUserId()) && StringUtil.isNotBlank(item.getAvatar()))
|
Map<String, String> userAvatarMap = userInfoByUserIds.stream()
|
||||||
// .collect(Collectors.toMap(k -> k.getUserId(), v -> v.getAvatar()));
|
.filter(item -> StringUtil.isNotBlank(item.getUserId()) && StringUtil.isNotBlank(item.getAvatar()))
|
||||||
// listByShopIdAndType.stream().forEach( item -> {
|
.collect(Collectors.toMap(k -> k.getUserId(), v -> v.getAvatar()));
|
||||||
// item.setAvatar(userAvatarMap.get(item.getSubmittedUserId()));
|
listByShopIdAndType.stream().forEach( item -> {
|
||||||
// });
|
item.setAvatar(userAvatarMap.get(item.getSubmittedUserId()));
|
||||||
// }
|
});
|
||||||
|
}
|
||||||
submitLicenseResponse.setProcessRecords(listByShopIdAndType);
|
submitLicenseResponse.setProcessRecords(listByShopIdAndType);
|
||||||
return submitLicenseResponse;
|
return submitLicenseResponse;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -107,7 +107,7 @@ public class AuditStatusServiceImpl implements AuditStatusService {
|
|||||||
response.setEndTime(DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, lineInterviewDO.getActualEndTime()));
|
response.setEndTime(DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, lineInterviewDO.getActualEndTime()));
|
||||||
}
|
}
|
||||||
if (Objects.nonNull(auditStatusDO.getCreateTime())){
|
if (Objects.nonNull(auditStatusDO.getCreateTime())){
|
||||||
response.setCheckTime(DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, auditStatusDO.getCreateTime()));
|
response.setCheckTime(DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, auditStatusDO.getUpdateTime()));
|
||||||
}
|
}
|
||||||
response.setCheckUser(auditStatusDO.getAuditUserName());
|
response.setCheckUser(auditStatusDO.getAuditUserName());
|
||||||
response.setCheckStatus(auditStatusDO.getAuditStatus());
|
response.setCheckStatus(auditStatusDO.getAuditStatus());
|
||||||
|
|||||||
Reference in New Issue
Block a user