邝工需求
This commit is contained in:
@@ -3,7 +3,9 @@ package com.chaozhanggui.admin.system.controller;
|
|||||||
|
|
||||||
import com.chaozhanggui.admin.system.service.PromotionImageService;
|
import com.chaozhanggui.admin.system.service.PromotionImageService;
|
||||||
import com.chaozhanggui.common.system.config.RespBody;
|
import com.chaozhanggui.common.system.config.RespBody;
|
||||||
|
import com.chaozhanggui.dao.system.dao.TbPlussUserAppMapper;
|
||||||
import com.chaozhanggui.dao.system.entity.TbPlussAppGuide;
|
import com.chaozhanggui.dao.system.entity.TbPlussAppGuide;
|
||||||
|
import com.chaozhanggui.dao.system.entity.TbPlussUserApp;
|
||||||
import com.dianguang.cloud.ossservice.config.CloudStorageConfig;
|
import com.dianguang.cloud.ossservice.config.CloudStorageConfig;
|
||||||
import com.dianguang.cloud.ossservice.service.OSSFactory;
|
import com.dianguang.cloud.ossservice.service.OSSFactory;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
@@ -40,6 +42,8 @@ public class PromotionImageController {
|
|||||||
private PromotionImageService promotionImageService;
|
private PromotionImageService promotionImageService;
|
||||||
@Autowired
|
@Autowired
|
||||||
CloudStorageConfig config;
|
CloudStorageConfig config;
|
||||||
|
@Resource
|
||||||
|
private TbPlussUserAppMapper userAppMapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 列表
|
* 列表
|
||||||
@@ -165,6 +169,21 @@ public class PromotionImageController {
|
|||||||
return new RespBody("000000","success");
|
return new RespBody("000000","success");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/merchantCode")
|
||||||
|
public RespBody getMerchantCodeByUserId(@RequestParam Integer userId){
|
||||||
|
if (userId != null ){
|
||||||
|
TbPlussUserApp tbPlussUserApp = userAppMapper.selectByUserId(userId);
|
||||||
|
if (tbPlussUserApp != null){
|
||||||
|
HashMap<String, String> map = new HashMap<>();
|
||||||
|
map.put("merchantCode",tbPlussUserApp.getMerchantcode());
|
||||||
|
return new RespBody("000000",map);
|
||||||
|
}
|
||||||
|
return new RespBody("999943");
|
||||||
|
}
|
||||||
|
return new RespBody("999943");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ public class AdminWebConfig implements WebMvcConfigurer {
|
|||||||
registry.addInterceptor(new LoginInterceptor(redisUtil))
|
registry.addInterceptor(new LoginInterceptor(redisUtil))
|
||||||
.addPathPatterns()
|
.addPathPatterns()
|
||||||
// 如果有静态资源的时候可以在这个地方放行
|
// 如果有静态资源的时候可以在这个地方放行
|
||||||
.excludePathPatterns("/","/user/doLogin","/agency/mytest","/agency/queryAgency","/promotion/testRequest","/promotion/testRequestBoolean","/promotion/testSuccess","/agency/sendmessage","/Alipay/pay");
|
.excludePathPatterns("/","/user/doLogin","/agency/mytest","/agency/queryAgency","/promotion/testRequest","/promotion/testRequestBoolean","/promotion/testSuccess","/agency/sendmessage",
|
||||||
|
"/Alipay/pay","/promotion/merchantCode");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ public class LoginInterceptor implements HandlerInterceptor {
|
|||||||
||"/admin/notifyCallback/authUser".equals(requestURI)
|
||"/admin/notifyCallback/authUser".equals(requestURI)
|
||||||
||"/admin/notifyCallback/createStore".equals(requestURI)
|
||"/admin/notifyCallback/createStore".equals(requestURI)
|
||||||
||"/admin/notifyCallback/modifySettle".equals(requestURI)
|
||"/admin/notifyCallback/modifySettle".equals(requestURI)
|
||||||
|
||"/admin/promotion/merchantCode".equals(requestURI)
|
||||||
){
|
){
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package com.chaozhanggui.admin.system.util;
|
|||||||
import java.security.MessageDigest;
|
import java.security.MessageDigest;
|
||||||
|
|
||||||
public class MD5Util {
|
public class MD5Util {
|
||||||
private static String byteArrayToHexString(byte b[]) {
|
private static String byteArrayToHexString(byte b[]) {
|
||||||
StringBuffer resultSb = new StringBuffer();
|
StringBuffer resultSb = new StringBuffer();
|
||||||
for (int i = 0; i < b.length; i++)
|
for (int i = 0; i < b.length; i++)
|
||||||
resultSb.append(byteToHexString(b[i]));
|
resultSb.append(byteToHexString(b[i]));
|
||||||
|
|||||||
Reference in New Issue
Block a user