Merge remote-tracking branch 'xfsg/cc_partner_init' into cc_partner_init
This commit is contained in:
@@ -88,17 +88,6 @@ public class ShopAuditInfoDO {
|
|||||||
@ApiModelProperty("数据类型 0-提交 1-审批")
|
@ApiModelProperty("数据类型 0-提交 1-审批")
|
||||||
private Integer dataType;
|
private Integer dataType;
|
||||||
|
|
||||||
@ApiModelProperty("头像")
|
|
||||||
private String avatar = "https://oss-store.coolcollege.cn/eid/e17cd2dc350541df8a8b0af9bd27f77d/2404/53308197437354940.png";
|
|
||||||
|
|
||||||
public String getAvatar() {
|
|
||||||
return avatar;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setAvatar(String avatar) {
|
|
||||||
this.avatar = avatar;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return id
|
* @return id
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -100,15 +100,15 @@ public class ApplyLicenseServiceImpl implements ApplyLicenseService {
|
|||||||
List<ShopAuditInfoDO> listByShopIdAndType = shopAuditInfoMapper.getListByShopIdAndType(shopId, AuditTypeEnum.LICENSE_APPROVAL.getCode());
|
List<ShopAuditInfoDO> 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(ShopAuditInfoDO::getSubmittedUserId).collect(Collectors.toList());
|
||||||
List<EnterpriseUserDO> userInfoByUserIds = new ArrayList<>();
|
List<EnterpriseUserDO> userInfoByUserIds = new ArrayList<>();
|
||||||
if (CollectionUtils.isNotEmpty(userIds)){
|
// if (CollectionUtils.isNotEmpty(userIds)){
|
||||||
userInfoByUserIds = userMapper.getUserInfoByUserIds(userIds);
|
// userInfoByUserIds = userMapper.getUserInfoByUserIds(userIds);
|
||||||
Map<String, String> userAvatarMap = userInfoByUserIds.stream()
|
// Map<String, String> userAvatarMap = userInfoByUserIds.stream()
|
||||||
.filter(item -> StringUtil.isNotBlank(item.getUserId()) && StringUtil.isNotBlank(item.getAvatar()))
|
// .filter(item -> StringUtil.isNotBlank(item.getUserId()) && StringUtil.isNotBlank(item.getAvatar()))
|
||||||
.collect(Collectors.toMap(k -> k.getUserId(), v -> v.getAvatar()));
|
// .collect(Collectors.toMap(k -> k.getUserId(), v -> v.getAvatar()));
|
||||||
listByShopIdAndType.stream().forEach( item -> {
|
// listByShopIdAndType.stream().forEach( item -> {
|
||||||
item.setAvatar(userAvatarMap.get(item.getSubmittedUserId()));
|
// item.setAvatar(userAvatarMap.get(item.getSubmittedUserId()));
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
submitLicenseResponse.setProcessRecords(listByShopIdAndType);
|
submitLicenseResponse.setProcessRecords(listByShopIdAndType);
|
||||||
return submitLicenseResponse;
|
return submitLicenseResponse;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -138,7 +138,7 @@ public class CoolStoreStartFlowServiceImpl implements CoolStoreStartFlowService
|
|||||||
Map<String, Object> requestMap = new HashMap<>();
|
Map<String, Object> requestMap = new HashMap<>();
|
||||||
fillSignatureInfo(requestMap);
|
fillSignatureInfo(requestMap);
|
||||||
try {
|
try {
|
||||||
String url = xfsgUrl + Constants.FRANCHISEE_STORE_NUM +
|
String url = xfsgUrl + Constants.FIRST_ORDER +
|
||||||
"?timestamp=" + requestMap.get("timestamp") + "&signature=" + requestMap.get("signature")+
|
"?timestamp=" + requestMap.get("timestamp") + "&signature=" + requestMap.get("signature")+
|
||||||
"&storeCode=" + shopCode;
|
"&storeCode=" + shopCode;
|
||||||
JSONObject jsonObject = httpRestTemplateService.getForObject(url, JSONObject.class, new HashMap<>());
|
JSONObject jsonObject = httpRestTemplateService.getForObject(url, JSONObject.class, new HashMap<>());
|
||||||
@@ -150,8 +150,6 @@ public class CoolStoreStartFlowServiceImpl implements CoolStoreStartFlowService
|
|||||||
throw new ServiceException(ErrorCodeEnum. GET_FIRST_ORDER);
|
throw new ServiceException(ErrorCodeEnum. GET_FIRST_ORDER);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void fillSignatureInfo(Map<String, Object> requestMap) {
|
private void fillSignatureInfo(Map<String, Object> requestMap) {
|
||||||
long timestamp = System.currentTimeMillis();
|
long timestamp = System.currentTimeMillis();
|
||||||
String signature = SecureUtil.getSignature(timestamp);
|
String signature = SecureUtil.getSignature(timestamp);
|
||||||
|
|||||||
@@ -74,12 +74,16 @@ public class FirstOrderServiceImp implements FirstOrderService {
|
|||||||
order.setUpdateTime(new Date());
|
order.setUpdateTime(new Date());
|
||||||
order.setUpdateUserId(userId);
|
order.setUpdateUserId(userId);
|
||||||
Integer num = firstOrderDAO.insertFirstOrder(order);
|
Integer num = firstOrderDAO.insertFirstOrder(order);
|
||||||
|
shopStageInfoDAO.updateShopStageAndAuditInfo(order.getShopId(),
|
||||||
|
ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_152, null);
|
||||||
//云立方同步
|
//云立方同步
|
||||||
if (num > 0) {
|
if (num > 0) {
|
||||||
try {
|
try {
|
||||||
ShopInfoDO shopInfo = shopService.getShopInfo(order.getShopId());
|
// ShopInfoDO shopInfo = shopService.getShopInfo(order.getShopId());
|
||||||
String shopCode = shopInfo.getShopCode();
|
// String shopCode = shopInfo.getShopInfopCode();
|
||||||
Boolean flag = coolStoreStartFlowService.getFirstOrder(shopCode);
|
// String shopCode = "31310383";
|
||||||
|
// Boolean flag = coolStoreStartFlowService.getFirstOrder(shopCode);
|
||||||
|
Boolean flag = Boolean.TRUE;
|
||||||
log.info("saveOrder,flag:{}", flag);
|
log.info("saveOrder,flag:{}", flag);
|
||||||
if (flag == null) {
|
if (flag == null) {
|
||||||
throw new ServiceException(ErrorCodeEnum.GET_FIRST_ORDER);
|
throw new ServiceException(ErrorCodeEnum.GET_FIRST_ORDER);
|
||||||
|
|||||||
@@ -196,9 +196,10 @@ public class OpeningOperationPlanImpl implements OpeningOperationPlanService {
|
|||||||
try {
|
try {
|
||||||
if (orderStageInfo.getShopSubStageStatus().
|
if (orderStageInfo.getShopSubStageStatus().
|
||||||
equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_152.getShopSubStageStatus())) {
|
equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_152.getShopSubStageStatus())) {
|
||||||
ShopInfoDO shopInfo = shopService.getShopInfo(shopId);
|
// ShopInfoDO shopInfo = shopService.getShopInfo(shopId);
|
||||||
String shopCode = shopInfo.getShopCode();
|
// String shopCode = shopInfo.getShopCode();
|
||||||
Boolean firstOrder = coolStoreStartFlowService.getFirstOrder(shopCode);
|
// Boolean firstOrder = coolStoreStartFlowService.getFirstOrder(shopCode);
|
||||||
|
Boolean firstOrder =Boolean.TRUE;
|
||||||
log.info("saveOrder,flag:{}", firstOrder);
|
log.info("saveOrder,flag:{}", firstOrder);
|
||||||
if (firstOrder) {
|
if (firstOrder) {
|
||||||
//更改子阶段状态
|
//更改子阶段状态
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ public class PCApplyLicenseController {
|
|||||||
* @param status 0通过 1不通过
|
* @param status 0通过 1不通过
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping(path = "/examine")
|
@GetMapping(path = "/examine")
|
||||||
@ApiOperation("证照审批列表")
|
@ApiOperation("证照审批列表")
|
||||||
public ResponseResult licenseExamine(@RequestParam("id") Long shopId,
|
public ResponseResult licenseExamine(@RequestParam("id") Long shopId,
|
||||||
@RequestParam("status") Integer status,
|
@RequestParam("status") Integer status,
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ public class ApplyLicenseController {
|
|||||||
* @param status 0通过 1不通过
|
* @param status 0通过 1不通过
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping(path = "/examine")
|
@GetMapping(path = "/examine")
|
||||||
@ApiOperation("证照审批列表")
|
@ApiOperation("证照审批列表")
|
||||||
public ResponseResult licenseExamine(@RequestParam("id") Long shopId,
|
public ResponseResult licenseExamine(@RequestParam("id") Long shopId,
|
||||||
@RequestParam("status") Integer status,
|
@RequestParam("status") Integer status,
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import com.cool.store.exception.ServiceException;
|
|||||||
import com.cool.store.mapper.LineInfoMapper;
|
import com.cool.store.mapper.LineInfoMapper;
|
||||||
import com.cool.store.mapper.TrainingExperienceMapper;
|
import com.cool.store.mapper.TrainingExperienceMapper;
|
||||||
import com.cool.store.mq.util.HttpRestTemplateService;
|
import com.cool.store.mq.util.HttpRestTemplateService;
|
||||||
|
import com.cool.store.service.CoolStoreStartFlowService;
|
||||||
import com.cool.store.service.PreparationService;
|
import com.cool.store.service.PreparationService;
|
||||||
import com.cool.store.utils.poi.constant.Constants;
|
import com.cool.store.utils.poi.constant.Constants;
|
||||||
import com.github.pagehelper.Page;
|
import com.github.pagehelper.Page;
|
||||||
@@ -51,6 +52,8 @@ public class XxlJobHandler {
|
|||||||
private ShopInfoDAO shopInfoDAO;
|
private ShopInfoDAO shopInfoDAO;
|
||||||
@Resource
|
@Resource
|
||||||
private ShopStageInfoDAO shopStageInfoDAO;
|
private ShopStageInfoDAO shopStageInfoDAO;
|
||||||
|
@Resource
|
||||||
|
private CoolStoreStartFlowService coolStoreStartFlowService;
|
||||||
/**
|
/**
|
||||||
* 每天都将待体验门店信息变更到体验中
|
* 每天都将待体验门店信息变更到体验中
|
||||||
*/
|
*/
|
||||||
@@ -97,6 +100,7 @@ public class XxlJobHandler {
|
|||||||
boolean hasNext =true;
|
boolean hasNext =true;
|
||||||
int PageNum = 1;
|
int PageNum = 1;
|
||||||
int PageSize = 50;
|
int PageSize = 50;
|
||||||
|
|
||||||
while(hasNext){
|
while(hasNext){
|
||||||
log.info("----查询更新订货金----");
|
log.info("----查询更新订货金----");
|
||||||
Page<Long> shopIdListByStageStatus = shopStageInfoDAO.getShopIdListByStageStatus(PageNum,PageSize);
|
Page<Long> shopIdListByStageStatus = shopStageInfoDAO.getShopIdListByStageStatus(PageNum,PageSize);
|
||||||
@@ -110,14 +114,12 @@ public class XxlJobHandler {
|
|||||||
for (Long shopId : map.keySet()){
|
for (Long shopId : map.keySet()){
|
||||||
String shopCode = map.get(shopId);
|
String shopCode = map.get(shopId);
|
||||||
try {
|
try {
|
||||||
String url = xfsgUrl + Constants.FIRST_ORDER + "?storeCode=" + shopCode;
|
Boolean firstOrder = coolStoreStartFlowService.getFirstOrder(shopCode);
|
||||||
JSONObject jsonObject = httpRestTemplateService.getForObject(url, JSONObject.class, new HashMap<>());
|
|
||||||
log.info("updateFirstOrder url:{},jsonObject:{}",url,jsonObject);
|
if (firstOrder == null) {
|
||||||
String string = jsonObject.getString("data");
|
|
||||||
if (string == null) {
|
|
||||||
throw new ServiceException(ErrorCodeEnum.GET_FIRST_ORDER);
|
throw new ServiceException(ErrorCodeEnum.GET_FIRST_ORDER);
|
||||||
}
|
}
|
||||||
if (string.equals("true")) {
|
if (firstOrder.equals(Boolean.TRUE)) {
|
||||||
shopStageInfoDAO.updateShopStageAndAuditInfo(shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_151, null);
|
shopStageInfoDAO.updateShopStageAndAuditInfo(shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_151, null);
|
||||||
preparationService.whetherToOpenForAcceptance(shopId);
|
preparationService.whetherToOpenForAcceptance(shopId);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user