推广图片,短信名称,创客申请,和php联通
This commit is contained in:
parent
d47550f8df
commit
8f1b329979
|
|
@ -51,15 +51,14 @@ public class IntroduceController {
|
|||
return ResultGenerator.genFailResult("");
|
||||
}
|
||||
}
|
||||
private String image(String typeCode){
|
||||
switch (typeCode){
|
||||
case "AG":
|
||||
return image.PROMOTION_IMAGE.getImageUrl();
|
||||
case "XW":
|
||||
return image.SMALL_IMAGE.getImageUrl();
|
||||
default:
|
||||
return image.OTHER_IMAGE.getImageUrl();
|
||||
private String image(String typeCode, String merchantType){
|
||||
if ("AG".equals(typeCode)){
|
||||
return image.PROMOTION_IMAGE.getImageUrl();
|
||||
}
|
||||
if ("1".equals(merchantType)){
|
||||
return image.SMALL_IMAGE.getImageUrl();
|
||||
}
|
||||
return image.OTHER_IMAGE.getImageUrl();
|
||||
}
|
||||
|
||||
@PostMapping ("/common")
|
||||
|
|
@ -74,7 +73,7 @@ public class IntroduceController {
|
|||
String type = httpServletRequest.getHeader("type");
|
||||
//TODO 暂时安卓开发IOS不开
|
||||
if ("1".equals(type)){
|
||||
return ResultGenerator.genSuccessResult(image(params.get("typeCode")));
|
||||
return ResultGenerator.genSuccessResult(image(params.get("typeCode"), params.get("merchantType")));
|
||||
}else if ("2".equals(type)){
|
||||
return ResultGenerator.genFailResult("");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1746,12 +1746,34 @@ public class UserAppController {
|
|||
UserApp info = userAppService.getUserAppByPhone(phone, userApp);
|
||||
return ResultGenerator.genSuccessResult("操作成功", info);
|
||||
}
|
||||
@GetMapping("/getUserId")
|
||||
public Result<Object> getUserId(@RequestParam String merchantStore){
|
||||
MerchantStore byId = merchantStoreService.getById(merchantStore);
|
||||
|
||||
QueryWrapper<UserApp> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("merchantCode",byId.getMerchantCode());
|
||||
queryWrapper.eq("userType","promoter");
|
||||
UserApp one = userAppService.getOne(queryWrapper);
|
||||
|
||||
if (one == null) {
|
||||
throw new MsgException("未找到商家");
|
||||
}
|
||||
|
||||
QueryWrapper<UserInfo> queryWrapper1 = new QueryWrapper<>();
|
||||
queryWrapper1.eq("id", one.getUserId());
|
||||
UserInfo one1 = userInfoService.getOne(queryWrapper1);
|
||||
HashMap<String, Object> map = new HashMap<>();
|
||||
map.put("userId", one.getUserId());
|
||||
map.put("myLoginName", one1.getLoginName());
|
||||
map.put("token", one.getToken());
|
||||
return ResultGenerator.genSuccessResult(map);
|
||||
}
|
||||
|
||||
/**
|
||||
* 申请
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(value = "applyMarker")
|
||||
@PostMapping(value = "/applyMarker")
|
||||
public Result<Object> applyMarker(){
|
||||
UserApp userApp = userAppService.checkApiToken();
|
||||
userAppService.applyMarker(userApp);
|
||||
|
|
|
|||
|
|
@ -75,6 +75,7 @@ public class TokenRegistryInterceptor extends HandlerInterceptorAdapter {
|
|||
limitUri.add("/api/merchantOrder/posTradeQueryNumber");
|
||||
limitUri.add("/api/device/stock/checkNum");
|
||||
limitUri.add("/api/device/stock/bindtablecode");
|
||||
limitUri.add("/api/userApp/getUserId");
|
||||
boolean passFlag = limitUri.stream().anyMatch(s -> s.equals(requestUri) || requestUri.startsWith(s));
|
||||
if (passFlag) {
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -255,7 +255,7 @@ public class ValidateCodeUtil {
|
|||
}
|
||||
// 1.发送短信
|
||||
com.aliyun.dysmsapi20170525.models.SendSmsRequest sendSmsRequest = new com.aliyun.dysmsapi20170525.models.SendSmsRequest()
|
||||
.setSignName("超掌柜")
|
||||
.setSignName("银收客")
|
||||
.setTemplateCode("SMS_244665149")
|
||||
.setTemplateParam("{\"code\":" +"'"+checkCode +"'"+"}")
|
||||
.setPhoneNumbers(phone);
|
||||
|
|
|
|||
|
|
@ -4,8 +4,9 @@ import lombok.Getter;
|
|||
|
||||
public enum image {
|
||||
SMALL_IMAGE("小微","https://czg-oss.oss-cn-hangzhou.aliyuncs.com/app/statics/%E5%B0%8F%E5%BE%AE.png",""),
|
||||
PROMOTION_IMAGE("推广","https://czg-oss.oss-cn-hangzhou.aliyuncs.com/app/statics/%E6%8E%A8%E5%B9%BF%E5%AE%BD%E5%9B%BE.png",""),
|
||||
OTHER_IMAGE("其他","https://czg-oss.oss-cn-hangzhou.aliyuncs.com/app/statics/%E5%95%86%E6%88%B7%E6%8E%A8%E5%B9%BF.png","");
|
||||
PROMOTION_IMAGE("推广","https://czg-oss.oss-cn-hangzhou.aliyuncs.com/app/statics/%E5%95%86%E6%88%B7%E6%8E%A8%E5%B9%BF.png",""),
|
||||
OTHER_IMAGE("其他","\n" +
|
||||
"https://czg-oss.oss-cn-hangzhou.aliyuncs.com/app/statics/%E6%99%AE%E9%80%9A%E5%95%86%E6%88%B7%E6%8E%A8%E5%B9%BF.png","");
|
||||
|
||||
/**
|
||||
* 通道值
|
||||
|
|
|
|||
|
|
@ -766,6 +766,13 @@ public class YSAuditServiceV3 implements cn.pluss.platform.channel.ys.YSAuditSer
|
|||
mcsService.updateById(mcs);
|
||||
mercAuditListener.onFail(mbi.getUserId(), mcs, note1);
|
||||
break;
|
||||
case YsConfigV3.STATUS_FAIL:
|
||||
String note2 = authData.getNote();
|
||||
mcs.setRemark(note2);
|
||||
mcs.setStatus(MerchantChannelStatus.AUDIT_STATUS_REJECT);
|
||||
mcsService.updateById(mcs);
|
||||
mercAuditListener.onFail(mbi.getUserId(), mcs, note2);
|
||||
break;
|
||||
case YsConfigV3.STATUS_SIGN_REFUSE:
|
||||
List<String> excludeStatus = Arrays.asList(MerchantChannelStatus.AUDIT_STATUS_REJECT, MerchantChannelStatus.AUDIT_STATUS_SUCCESS);
|
||||
MerchantChannelStatus finalMcs = mcs;
|
||||
|
|
|
|||
|
|
@ -325,7 +325,7 @@ public class MercOrderDetailServiceImpl extends ServiceImpl<MercOrderDetailMappe
|
|||
client = createClient();
|
||||
// 1.发送短信
|
||||
com.aliyun.dysmsapi20170525.models.SendSmsRequest sendSmsRequest = new com.aliyun.dysmsapi20170525.models.SendSmsRequest()
|
||||
.setSignName("超掌柜")
|
||||
.setSignName("银收客")
|
||||
.setTemplateCode("SMS_244665149")
|
||||
.setTemplateParam("{\"code\":" + "'" + checkCode + "'" + "}")
|
||||
.setPhoneNumbers(phoneValidateCode.getPhone());
|
||||
|
|
|
|||
|
|
@ -48,6 +48,7 @@ import cn.pluss.platform.wx.WxTalkService;
|
|||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.metadata.OrderItem;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
|
|
@ -810,6 +811,7 @@ public class UserAppServiceImpl extends ServiceImpl<UserAppMapper, UserApp> impl
|
|||
break;
|
||||
case "6":
|
||||
ysAuditServiceV3.merchantAuditV3(userId, false, 6);
|
||||
break;
|
||||
default:
|
||||
MsgException.throwException("未知的进件通道");
|
||||
}
|
||||
|
|
@ -1942,13 +1944,21 @@ public class UserAppServiceImpl extends ServiceImpl<UserAppMapper, UserApp> impl
|
|||
userMarkerMapper.insert(marker);
|
||||
}
|
||||
|
||||
UserPromotion userPromotion= userPromotionMapper.selectById(userApp.getUserId());
|
||||
//UserPromotion userPromotion= userPromotionMapper.selectById(userApp.getUserId());
|
||||
QueryWrapper<UserPromotion> queryWrapper = new QueryWrapper<UserPromotion>();
|
||||
queryWrapper.eq("user_id", userApp.getUserId());
|
||||
UserPromotion userPromotion = userPromotionMapper.selectOne(queryWrapper);
|
||||
|
||||
if(ObjectUtil.isEmpty(userPromotion)){
|
||||
MsgException.checkNull(null,"用户信息错误");
|
||||
}
|
||||
|
||||
userPromotion.setIsExtend("3");
|
||||
userPromotion.setUpdateTime(new Date());
|
||||
userPromotionMapper.updateById(userPromotion);
|
||||
UpdateWrapper<UserPromotion> updateWrapper = new UpdateWrapper<>();
|
||||
updateWrapper.eq("user_id", userPromotion.getUserId())
|
||||
.set("update_time", new Date())
|
||||
.set("is_extend", "3");
|
||||
userPromotionMapper.update(userPromotion,updateWrapper);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue