袁野 5 months ago
parent d09e000994
commit 461478d61a
  1. 2
      hai-bweb/src/main/java/com/bweb/controller/FileUploadController.java
  2. 2
      hai-bweb/src/main/java/com/bweb/controller/HighTestController.java
  3. 12
      hai-order/src/main/java/com/web/controller/OrderController.java
  4. 2
      hai-schedule/src/main/java/com/hai/schedule/ApiThirdProductSchedule.java
  5. 3
      hai-schedule/src/main/java/com/hai/schedule/HighGasSchedule.java
  6. 12
      hai-service/src/main/java/com/hai/service/HighUserService.java
  7. 1
      hai-service/src/main/java/com/hai/service/impl/ApiProductServiceImpl.java
  8. 32
      hai-service/src/main/java/com/hai/service/impl/HighUserServiceImpl.java
  9. 14
      hai-service/src/main/resources/dev/commonConfig.properties
  10. 7
      hai-user/src/main/java/com/web/controller/WechatController.java
  11. 37
      v1/src/main/java/com/v1/controller/orderController.java

@ -76,7 +76,7 @@ public class FileUploadController {
// 图片压缩
InputStream fis = new FileInputStream(destDirName + File.separator + fileName);
System.out.println("图片上传大小" + fis.available());
if (fis.available() > 500000) {
if (fis.available() > 3000000) {
Thumbnails.of(new FileInputStream(destDirName + File.separator + fileName)).scale(0.5).toFile(new File(destDirName + File.separator + fileName));
}
System.out.println("图片上传日志" + childPath + "/" + fileName);

File diff suppressed because one or more lines are too long

@ -98,10 +98,10 @@ public class OrderController {
log.error("OrderController -> create() error!","");
throw ErrorHelp.genException(SysCode.System, ErrorCode.USE_VISIT_ILLEGAL, "");
}
if (StringUtils.isBlank(userModel.getHighUser().getPhone())) {
log.error("OrderController -> create() error!","");
throw ErrorHelp.genException(SysCode.System, ErrorCode.NO_BIND_PHONE, "");
}
// if (StringUtils.isBlank(userModel.getHighUser().getPhone())) {
// log.error("OrderController -> create() error!","");
// throw ErrorHelp.genException(SysCode.System, ErrorCode.NO_BIND_PHONE, "");
// }
body.setMemId(userModel.getHighUser().getId());
body.setMemName(userModel.getHighUser().getName());
body.setMemPhone(userModel.getHighUser().getPhone());
@ -312,7 +312,11 @@ public class OrderController {
GoodsLogistics logistics = goodsLogisticsService.findGoodsLogistics(childOrder.getId());
if (logistics != null) {
if (logistics.getLogisticsStatusDesc() == null ) {
childOrder.setExt6("待揽收");
} else {
childOrder.setExt6(logistics.getLogisticsStatusDesc());
}
childOrder.setExt4(logistics.getNumber());
}

@ -72,7 +72,7 @@ public class ApiThirdProductSchedule {
}
}
@Scheduled(cron = "0 0 1 * * ?") // 获取肯德基门店 每日凌晨1点执行一次
@Scheduled(cron = "0 0 10 * * ?") // 获取肯德基门店 每日10点执行一次
public void getKfcStore() throws Exception {
JSONObject jsonObject = QianZhuConfig.getKfcStore();

@ -147,10 +147,9 @@ public class HighGasSchedule {
// }
// }
// }
@Scheduled(cron = "5 0 0 * * ?") // 每日凌晨00:00:5执行一次
public void getJiaHaoYouAllStation() throws Exception {
gasService.getJiaHaoYouAllStation();
// gasService.getJiaHaoYouAllStation();
}
// @Scheduled(cron = "5 0 0 * * ?") // 每日凌晨00:00:5执行一次

@ -31,6 +31,18 @@ public interface HighUserService {
*/
SessionObject loginAndRegister(LoginPlatform platForm, String phone, Long popularizeUserId, Map<String, Object> other, HttpServletRequest request, HttpServletResponse response) throws Exception;
/**
* @MethodName loginAndRegister
* @Description: 登录并注册
* @param unionId
* @param request
* @param response
* @return: com.hai.common.security.SessionObject
* @Author: Sum1Dream
* @Date: 2024/7/2 下午3:13
*/
SessionObject loginAndRegister(String phone , String unionId, HttpServletRequest request, HttpServletResponse response) throws Exception;
/**
* 查询用户列表
* @param param

@ -434,6 +434,7 @@ public class ApiProductServiceImpl implements ApiProductService {
if (StringUtils.isNotBlank(MapUtils.getString(map , "cityCode"))) {
criteria.andCityCodeEqualTo(MapUtils.getString(map , "cityCode"));
}
criteria.andStoreStatusEqualTo(1).andShelfStatusEqualTo(1);
return apiKfcStoresMapper.selectByExample(example);
}

@ -168,6 +168,38 @@ public class HighUserServiceImpl implements HighUserService {
return so;
}
@Override
public SessionObject loginAndRegister(String phone , String unionId, HttpServletRequest request, HttpServletResponse response) throws Exception {
HighUser user = findByUnionId(unionId);
if (user == null) {
user = new HighUser();
user.setName("嗨用户");
user.setRegTime(new Date());
user.setGold(0);
user.setStatus(1);
user.setPhone(phone);
user.setInfoCompleteStatus(1); // 用户信息完整状态 0:完整 1:需要填写用户信息 2:需要填写手机号
user.setUnionId(unionId);
highUserMapper.insert(user);
} else {
user.setPhone(phone);
user.setUnionId(unionId);
highUserMapper.updateByPrimaryKeySelective(user);
}
// 缓存登录信息
HighUserModel highUserModel = new HighUserModel();
highUserModel.setHighUser(getDetailDataByUser(user.getId()));
SessionObject so = new SessionObject(unionId, 1 , highUserModel);
userCenter.save(request,response,so);
return so;
}
@Override
public List<HighUser> getUserList(Map<String, Object> param) {
HighUserExample example = new HighUserExample();

@ -36,13 +36,13 @@ jzPrivateKeyUrl=/home/project/hsg/fileKey/JzPrivateKey.key
jzPublicKeyUrl=/home/project/hsg/fileKey/JzPublicKey.key
# ????
qinzhuUrl=https://live-test.qianzhu8.com
qinzhuUrlToken=https://live-test.qianzhu8.com/gateway
qinzhuHtmlUrl=https://m-test.qianzhu8.com
qianzhuH5url=https://nf-test.qianzhu8.com/gateway
qinzhuPlatformId=10376
qinzhuSecret=ktxb49sh2jfhgn8g
qianzhuOrderNotify=https://hsgcs.dctpay.com/crest/qianzhu/orderNotify
qinzhuUrl=https://live.qianzhu8.com
qinzhuUrlToken=https://live.qianzhu8.com/gateway
qinzhuHtmlUrl=https://qz.dctpay.com
qianzhuH5url=https://nf.qianzhu8.com/gateway
qinzhuPlatformId=10458
qinzhuSecret=nnl3gg4ss0pka11t
qianzhuOrderNotify=https://hsg.dctpay.com/crest/qianzhu/orderNotify
thirdAppKey=211394653
thirdAppSecret=cyQpQKMaGUG186iEZRt1uQ==

@ -49,8 +49,9 @@ public class WechatController {
@RequestMapping(value = "/loginBySilence", method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "【H5】根据手机号登录")
public ResponseData loginBySilence(@RequestParam(value = "phone", required = true) String phone ,
@ApiOperation(value = "【H5】根据unionId登录")
public ResponseData loginBySilence(@RequestParam(value = "unionId", required = true) String unionId ,
@RequestParam(value = "phone", required = false) String phone ,
HttpServletRequest request, HttpServletResponse response) {
try {
@ -60,7 +61,7 @@ public class WechatController {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知客户端");
}
return ResponseMsgUtil.success(userService.loginAndRegister(platform, phone, null, new HashMap<>(), request, response));
return ResponseMsgUtil.success(userService.loginAndRegister( phone , unionId, request, response));
} catch (Exception e) {
return ResponseMsgUtil.exception(e);

@ -86,11 +86,11 @@ public class orderController {
} else {
ip = request.getHeader("x-forwarded-for");
}
//
// if (!apiIpAddressService.validationIpAddressLegal(object.getString("merchId") , ip)) {
// log.error("getRechargeProduct error!", "非法ip地址,请联系管理人员!");
// throw ErrorHelp.genException(SysCode.System, ErrorCode.IP_ERROR, "非法ip地址,请联系管理人员!");
// }
if (!apiIpAddressService.validationIpAddressLegal(object.getString("merchId") , ip)) {
log.error("getRechargeProduct error!", "非法ip地址,请联系管理人员!");
throw ErrorHelp.genException(SysCode.System, ErrorCode.IP_ERROR, "非法ip地址,请联系管理人员!");
}
if (
StringUtils.isBlank(object.getString("productType")) ||
@ -233,7 +233,6 @@ public class orderController {
log.error("getRechargeProduct error!", "帐户错误!");
throw ErrorHelp.genException(SysCode.System, ErrorCode.ACCOUNT_NOT_EXIST);
}
Map<String , Object> map = new HashMap<>();
map.put("mchOrderNo" , object.getString("mchOrderNo"));
map.put("apiKey" , apiMerchants.getApiKey());
@ -279,11 +278,11 @@ public class orderController {
} else {
ip = request.getHeader("x-forwarded-for");
}
//
// if (!apiIpAddressService.validationIpAddressLegal(object.getString("merchId") , ip)) {
// log.error("getRechargeProduct error!", "非法ip地址,请联系管理人员!");
// throw ErrorHelp.genException(SysCode.System, ErrorCode.IP_ERROR, "非法ip地址,请联系管理人员!");
// }
if (!apiIpAddressService.validationIpAddressLegal(object.getString("merchId") , ip)) {
log.error("getRechargeProduct error!", "非法ip地址,请联系管理人员!");
throw ErrorHelp.genException(SysCode.System, ErrorCode.IP_ERROR, "非法ip地址,请联系管理人员!");
}
if (
StringUtils.isBlank(object.getString("mchOrderNo")) ||
@ -333,10 +332,10 @@ public class orderController {
ip = request.getHeader("x-forwarded-for");
}
// if (!apiIpAddressService.validationIpAddressLegal(object.getString("merchId") , ip)) {
// log.error("getRechargeProduct error!", "非法ip地址,请联系管理人员!");
// throw ErrorHelp.genException(SysCode.System, ErrorCode.IP_ERROR, "非法ip地址,请联系管理人员!");
// }
if (!apiIpAddressService.validationIpAddressLegal(object.getString("merchId") , ip)) {
log.error("getRechargeProduct error!", "非法ip地址,请联系管理人员!");
throw ErrorHelp.genException(SysCode.System, ErrorCode.IP_ERROR, "非法ip地址,请联系管理人员!");
}
if (
StringUtils.isBlank(object.getString("mchOrderNo")) ||
@ -406,10 +405,10 @@ public class orderController {
ip = request.getHeader("x-forwarded-for");
}
// if (!apiIpAddressService.validationIpAddressLegal(object.getString("merchId") , ip)) {
// log.error("getRechargeProduct error!", "非法ip地址,请联系管理人员!");
// throw ErrorHelp.genException(SysCode.System, ErrorCode.IP_ERROR, "非法ip地址,请联系管理人员!");
// }
if (!apiIpAddressService.validationIpAddressLegal(object.getString("merchId") , ip)) {
log.error("getRechargeProduct error!", "非法ip地址,请联系管理人员!");
throw ErrorHelp.genException(SysCode.System, ErrorCode.IP_ERROR, "非法ip地址,请联系管理人员!");
}
if (
StringUtils.isBlank(object.getString("paySerialNo")) ||

Loading…
Cancel
Save