去掉短信
This commit is contained in:
@@ -26,9 +26,9 @@
|
||||
</sql>
|
||||
|
||||
<insert id="batchAddShop" useGeneratedKeys="true" keyProperty="id" keyColumn="id">
|
||||
insert into xfsg_shop_info(region_id, line_id, partner_id, shop_name, shop_code) values
|
||||
insert into xfsg_shop_info(region_id, line_id, partner_id, shop_name, shop_num,supervisor_user_id,) values
|
||||
<foreach collection="shopInfoList" item="shop" separator=",">
|
||||
(#{shop.regionId}, #{shop.lineId}, #{shop.partnerId}, #{shop.shopName}, #{shop.shopCode})
|
||||
(#{shop.regionId}, #{shop.lineId}, #{shop.partnerId}, #{shop.shopName}, #{shop.shopNum},#{shop.supervisorUserId})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
|
||||
@@ -132,43 +132,44 @@ public class CommonService {
|
||||
|
||||
public void sendSms(List<String> poneNumbers, SMSMsgEnum templateCode, Map<String, String> templateParamMap){
|
||||
log.info("templateCode:{}, request:{}, poneNumbers:{}", templateCode.getTitle(), JSONObject.toJSONString(templateParamMap), JSONObject.toJSONString(poneNumbers));
|
||||
if(CollectionUtils.isEmpty(poneNumbers)){
|
||||
return;
|
||||
}
|
||||
List<String> signNameList = new ArrayList<>();
|
||||
signNameList.add("酷店掌");
|
||||
AsyncClient client = null;
|
||||
try {
|
||||
StaticCredentialProvider provider = StaticCredentialProvider.create(Credential.builder()
|
||||
.accessKeyId(smsAccessKeyId)
|
||||
.accessKeySecret(smsAccessKeySecret)
|
||||
.build());
|
||||
client = AsyncClient.builder()
|
||||
.region("cn-hangzhou")
|
||||
.credentialsProvider(provider)
|
||||
.overrideConfiguration(
|
||||
ClientOverrideConfiguration.create()
|
||||
.setEndpointOverride("dysmsapi.aliyuncs.com")
|
||||
)
|
||||
.build();
|
||||
SendBatchSmsRequest sendBatchSmsRequest = SendBatchSmsRequest.builder()
|
||||
.phoneNumberJson(JSONObject.toJSONString(poneNumbers))
|
||||
.signNameJson(JSONObject.toJSONString(signNameList))
|
||||
.templateCode(templateCode.getTemplateCode())
|
||||
.templateParamJson("[" + JSONObject.toJSONString(templateParamMap) + "]")
|
||||
.build();
|
||||
CompletableFuture<SendBatchSmsResponse> response = client.sendBatchSms(sendBatchSmsRequest);
|
||||
SendBatchSmsResponse resp = response.get();
|
||||
log.info("短信发送templateCode:{}, response:{}", templateCode.getTemplateCode(), JSONObject.toJSONString(resp));
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
} catch (ExecutionException e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
if(Objects.isNull(client)){
|
||||
client.close();
|
||||
}
|
||||
}
|
||||
// if(CollectionUtils.isEmpty(poneNumbers)){
|
||||
// return;
|
||||
// }
|
||||
// List<String> signNameList = new ArrayList<>();
|
||||
// signNameList.add("酷店掌");
|
||||
// AsyncClient client = null;
|
||||
// try {
|
||||
// StaticCredentialProvider provider = StaticCredentialProvider.create(Credential.builder()
|
||||
// .accessKeyId(smsAccessKeyId)
|
||||
// .accessKeySecret(smsAccessKeySecret)
|
||||
// .build());
|
||||
// client = AsyncClient.builder()
|
||||
// .region("cn-hangzhou")
|
||||
// .credentialsProvider(provider)
|
||||
// .overrideConfiguration(
|
||||
// ClientOverrideConfiguration.create()
|
||||
// .setEndpointOverride("dysmsapi.aliyuncs.com")
|
||||
// )
|
||||
// .build();
|
||||
// SendBatchSmsRequest sendBatchSmsRequest = SendBatchSmsRequest.builder()
|
||||
// .phoneNumberJson(JSONObject.toJSONString(poneNumbers))
|
||||
// .signNameJson(JSONObject.toJSONString(signNameList))
|
||||
// .templateCode(templateCode.getTemplateCode())
|
||||
// .templateParamJson("[" + JSONObject.toJSONString(templateParamMap) + "]")
|
||||
// .build();
|
||||
// CompletableFuture<SendBatchSmsResponse> response = client.sendBatchSms(sendBatchSmsRequest);
|
||||
// SendBatchSmsResponse resp = response.get();
|
||||
// log.info("短信发送templateCode:{}, response:{}", templateCode.getTemplateCode(), JSONObject.toJSONString(resp));
|
||||
// } catch (InterruptedException e) {
|
||||
// e.printStackTrace();
|
||||
// } catch (ExecutionException e) {
|
||||
// e.printStackTrace();
|
||||
// } finally {
|
||||
// if(Objects.isNull(client)){
|
||||
// client.close();
|
||||
// }
|
||||
// }
|
||||
log.info("短信发送成功(已过滤)");
|
||||
}
|
||||
|
||||
public static String splitMethod(String kdzBusinessId) {
|
||||
|
||||
@@ -594,6 +594,13 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
throw new ServiceException(ErrorCodeEnum.DESIGN_NO_COMPLETE);
|
||||
}
|
||||
shopStageInfoDAO.batchUpdateShopStageStatus(shopId, Arrays.asList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_112, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_120));
|
||||
AcceptanceInfoDO acceptance = acceptanceInfoDAO.selectByShopId(shopId);
|
||||
AcceptanceInfoDO acceptanceInfoDO = new AcceptanceInfoDO();
|
||||
acceptanceInfoDO.setShopId(shopId);
|
||||
acceptanceInfoDO.setCreateTime(new Date());
|
||||
if(Objects.isNull(acceptance)) {
|
||||
acceptanceInfoDAO.insertSelectiveAcceptanceInfo(acceptanceInfoDO);
|
||||
}
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
|
||||
|
||||
@@ -122,13 +122,13 @@ public class OpeningOperationPlanImpl implements OpeningOperationPlanService {
|
||||
}else {
|
||||
collect = allUserByRoleEnumAndRegionId.stream()
|
||||
.filter(user -> user.getName() != null)
|
||||
.map(user -> user.getName() + "_" + user.getJobnumber())
|
||||
.map(user -> user.getName())
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
if (Objects.nonNull(openingOperationPlanDO)) {
|
||||
openingOperationPlanVO = new OpeningOperationPlanVO(openingOperationPlanDO);
|
||||
openingOperationPlanVO.setSubmiter(Objects.isNull(userInfoById) ? null : userInfoById.getName()+"_"+userInfoById.getJobnumber());
|
||||
openingOperationPlanVO.setSubmiter(Objects.isNull(userInfoById) ? null : userInfoById.getName());
|
||||
openingOperationPlanVO.setApprover(CollectionUtils.isEmpty(collect) ? null : collect.stream().collect(Collectors.joining(",")));
|
||||
String preparationUserIds = openingOperationPlanDO.getPreparationUserIds();
|
||||
List<String> stream = Arrays.stream(preparationUserIds.split(CommonConstants.COMMA)).collect(Collectors.toList());
|
||||
|
||||
@@ -5,11 +5,13 @@ import com.cool.store.entity.*;
|
||||
import com.cool.store.enums.ErrorCodeEnum;
|
||||
import com.cool.store.enums.MessageEnum;
|
||||
import com.cool.store.enums.SMSMsgEnum;
|
||||
import com.cool.store.enums.UserRoleEnum;
|
||||
import com.cool.store.enums.point.*;
|
||||
import com.cool.store.exception.ServiceException;
|
||||
import com.cool.store.request.AddShopRequest;
|
||||
import com.cool.store.request.DeleteShopRequest;
|
||||
import com.cool.store.service.ShopService;
|
||||
import com.cool.store.service.UserAuthMappingService;
|
||||
import com.cool.store.utils.NumberConverter;
|
||||
import com.cool.store.utils.RandomEightCharCodeUtils;
|
||||
import com.cool.store.vo.shop.MiniShopPageVO;
|
||||
@@ -45,6 +47,8 @@ public class ShopServiceImpl implements ShopService {
|
||||
private PointRecommendDAO pointRecommendDAO;
|
||||
@Resource
|
||||
private CommonService commonService;
|
||||
@Resource
|
||||
UserAuthMappingService userAuthMappingService;
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@@ -64,9 +68,10 @@ public class ShopServiceImpl implements ShopService {
|
||||
shopInfo.setRegionId(lineInfo.getRegionId());
|
||||
shopInfo.setLineId(lineInfo.getId());
|
||||
shopInfo.setPartnerId(lineInfo.getPartnerId());
|
||||
shopInfo.setSupervisorUserId(lineInfo.getInvestmentManager());
|
||||
//初始化
|
||||
shopInfo.setShopCode(RandomEightCharCodeUtils.getCode());
|
||||
shopInfo.setStoreNum(RandomEightCharCodeUtils.getCode());
|
||||
EnterpriseUserDO supervisor = userAuthMappingService.hierarchicalSearch(UserRoleEnum.SUPERVISION, shopInfo.getRegionId());
|
||||
shopInfo.setSupervisorUserId((Objects.isNull(supervisor)||supervisor.getUserId()==null)?lineInfo.getInvestmentManager():supervisor.getUserId());
|
||||
shopInfo.setShopName("店铺" + NumberConverter.convertArabicToChinese(i + 1));
|
||||
addShopList.add(shopInfo);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user