|
@@ -41,7 +41,7 @@ import java.util.UUID;
|
|
|
|
|
|
@Slf4j
|
|
|
@RestController
|
|
|
-@Api(value = "公共API", tags ={"公共API"} )
|
|
|
+@Api(value = "公共API", tags = {"公共API"})
|
|
|
@RequestMapping(value = "/common", produces = "application/json; charset=utf-8")
|
|
|
public class CommonController {
|
|
|
|
|
@@ -102,7 +102,7 @@ public class CommonController {
|
|
|
@ApiParam(required = true, value = "附件") @RequestParam(required = true) String logisticsNo,
|
|
|
@ApiParam(required = true, value = "物流公司code") @RequestParam(required = true) String companyCode
|
|
|
) throws IOException, RemoteServiceException {
|
|
|
- List<ExpressInfo> expressInfos = expressLogic.queryExpress(logisticsNo,companyCode);
|
|
|
+ List<ExpressInfo> expressInfos = expressLogic.queryExpress(logisticsNo, companyCode);
|
|
|
return ResponseHelper.success(expressInfos);
|
|
|
}
|
|
|
|
|
@@ -110,9 +110,9 @@ public class CommonController {
|
|
|
@GetMapping("/street")
|
|
|
@ApiOperation(value = "街道")
|
|
|
public ResponseHelper<List<Map>> street(
|
|
|
- @ApiParam(value = "省",required = true) @RequestParam(required = true) String province,
|
|
|
- @ApiParam(value = "市",required = true) @RequestParam(required = true) String city,
|
|
|
- @ApiParam(value = "区",required = true) @RequestParam(required = true) String area
|
|
|
+ @ApiParam(value = "省", required = true) @RequestParam(required = true) String province,
|
|
|
+ @ApiParam(value = "市", required = true) @RequestParam(required = true) String city,
|
|
|
+ @ApiParam(value = "区", required = true) @RequestParam(required = true) String area
|
|
|
) throws RemoteServiceException {
|
|
|
List<Map> street = commonLogic.street(province, city, area);
|
|
|
return ResponseHelper.success(street);
|
|
@@ -123,12 +123,12 @@ public class CommonController {
|
|
|
@ApiOperation(value = "轮播图列表")
|
|
|
public ResponseHelper<Page<CarouselMap>> page(
|
|
|
HttpServletRequest request,
|
|
|
- @ApiParam(value = "状态(true:启用 false:禁用",required = false) @RequestParam(required = false) Boolean state,
|
|
|
- @ApiParam(value = "轮播图类型 SHOP=商城 ESHOP=二手商城 YJHX=以旧换新入口",required = false) @RequestParam(required = false) String port,
|
|
|
- @ApiParam(value = "页号",required = true) @RequestParam(required = true) Integer pageNum,
|
|
|
- @ApiParam(value = "页大小",required = true) @RequestParam(required = true) Integer pageSize
|
|
|
+ @ApiParam(value = "状态(true:启用 false:禁用", required = false) @RequestParam(required = false) Boolean state,
|
|
|
+ @ApiParam(value = "轮播图类型 SHOP=商城 ESHOP=二手商城 YJHX=以旧换新入口", required = false) @RequestParam(required = false) String port,
|
|
|
+ @ApiParam(value = "页号", required = true) @RequestParam(required = true) Integer pageNum,
|
|
|
+ @ApiParam(value = "页大小", required = true) @RequestParam(required = true) Integer pageSize
|
|
|
) throws RemoteServiceException {
|
|
|
- IPage<CarouselMap> page = carouselMapLogic.page(request,state,port,pageNum, pageSize);
|
|
|
+ IPage<CarouselMap> page = carouselMapLogic.page(request, state, port, pageNum, pageSize);
|
|
|
return ResponseHelper.success(page);
|
|
|
}
|
|
|
|
|
@@ -150,7 +150,7 @@ public class CommonController {
|
|
|
@GetMapping("/scene")
|
|
|
@ApiOperation(value = "获取微信scene参数")
|
|
|
public ResponseHelper<String> page(
|
|
|
- @ApiParam(value = "微信scene",required = true) @RequestParam(required = true) String scene
|
|
|
+ @ApiParam(value = "微信scene", required = true) @RequestParam(required = true) String scene
|
|
|
) throws RemoteServiceException {
|
|
|
String sceneValue = commonLogic.getSceneValue(scene);
|
|
|
return ResponseHelper.success(sceneValue);
|
|
@@ -172,12 +172,12 @@ public class CommonController {
|
|
|
|
|
|
//企业微信回调
|
|
|
@ApiNotAuth
|
|
|
- @RequestMapping(value = "/callback",method = {RequestMethod.POST})
|
|
|
+ @RequestMapping(value = "/callback", method = {RequestMethod.POST})
|
|
|
public String recePost(
|
|
|
- @RequestParam(name="msg_signature",required = false) String msgSignature,
|
|
|
- @RequestParam(name="timestamp",required = false) String timestamp,
|
|
|
- @RequestParam(name="nonce",required = false) String nonce,
|
|
|
- @RequestParam(name="echostr",required = false) String echostr
|
|
|
+ @RequestParam(name = "msg_signature", required = false) String msgSignature,
|
|
|
+ @RequestParam(name = "timestamp", required = false) String timestamp,
|
|
|
+ @RequestParam(name = "nonce", required = false) String nonce,
|
|
|
+ @RequestParam(name = "echostr", required = false) String echostr
|
|
|
) throws AesException {
|
|
|
//String s = new WXBizJsonMsgCrypt(workToken, encodingAesKey,corpId).VerifyURL(msgSignature, timestamp, nonce, echostr);
|
|
|
return "success";
|
|
@@ -185,20 +185,33 @@ public class CommonController {
|
|
|
|
|
|
@GetMapping("/getVerifi")
|
|
|
@ApiOperation(value = "获取拖拽式验证码")
|
|
|
- public ResponseHelper<Map<String, Object>> getVerifi(){
|
|
|
+ public ResponseHelper<Map<String, Object>> getVerifi() {
|
|
|
Map<String, Object> map = VerifiUtils.getVerifi();
|
|
|
Integer xWidth = (Integer) map.get("xWidth");
|
|
|
String key = UUID.randomUUID().toString();
|
|
|
- redisUtil.set(Constant.RedisPrefix.VERIFICATION + ":" + key,xWidth,2*60);
|
|
|
+ redisUtil.set(Constant.RedisPrefix.VERIFICATION + ":" + key, xWidth, 2 * 60);
|
|
|
map.remove("xWidth");
|
|
|
- map.put("key",key);
|
|
|
+ map.put("key", key);
|
|
|
+ return ResponseHelper.success(map);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiNotAuth
|
|
|
+ @GetMapping("/not/auth/getVerifi")
|
|
|
+ @ApiOperation(value = "无授权获取拖拽式验证码")
|
|
|
+ public ResponseHelper<Map<String, Object>> notAuthGetVerifi() {
|
|
|
+ Map<String, Object> map = VerifiUtils.getVerifi();
|
|
|
+ Integer xWidth = (Integer) map.get("xWidth");
|
|
|
+ String key = UUID.randomUUID().toString();
|
|
|
+ redisUtil.set(Constant.RedisPrefix.VERIFICATION + ":" + key, xWidth, 2 * 60);
|
|
|
+ map.remove("xWidth");
|
|
|
+ map.put("key", key);
|
|
|
return ResponseHelper.success(map);
|
|
|
}
|
|
|
|
|
|
@ApiNotAuth
|
|
|
@GetMapping("/config/get")
|
|
|
@ApiOperation("获取小程序配置")
|
|
|
- public ResponseHelper<AdminCompanyWechat> getConfig(HttpServletRequest request){
|
|
|
+ public ResponseHelper<AdminCompanyWechat> getConfig(HttpServletRequest request) {
|
|
|
CurrentCompanyWechat currentCompanyWechat = commonLogic.getCurrentCompanyWechat(request);
|
|
|
//剔除不返回的内容
|
|
|
currentCompanyWechat.setAppId(null);
|
|
@@ -227,7 +240,7 @@ public class CommonController {
|
|
|
|
|
|
@ApiNotAuth
|
|
|
@GetMapping("/getfile")
|
|
|
- public ResponseHelper<String> getfile(@RequestParam(required = true) String id){
|
|
|
+ public ResponseHelper<String> getfile(@RequestParam(required = true) String id) {
|
|
|
OrderTax orderTax = orderTaxService.getById(id);
|
|
|
String taxLink = orderTax.getTaxLink();
|
|
|
return ResponseHelper.success(taxLink);
|