推广图片,短信名称,创客申请,和php联通
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user