提交代码

dev-discount
胡锐 2 years ago
parent 12361207d4
commit d3f57a533b
  1. 6
      .gitignore
  2. 2
      hai-bweb/src/main/java/com/bweb/controller/LoginController.java
  3. 2
      hai-bweb/src/main/java/com/bweb/controller/SecRoleController.java
  4. 75
      hai-cweb/src/main/java/com/cweb/controller/HighGasOrderController.java
  5. 2
      hai-order/pom.xml
  6. 1
      hai-order/src/main/java/com/web/controller/OrderController.java
  7. 68
      hai-order/src/main/java/com/web/controller/OrderPayController.java
  8. 10
      hai-order/src/main/resources/dev/application.yml
  9. 2
      hai-service/src/main/java/com/hai/common/security/SessionObject.java
  10. 30
      hai-service/src/main/java/com/hai/common/utils/BaiduUtils.java
  11. 26
      hai-service/src/main/java/com/hai/common/utils/RequestUtils.java
  12. 64
      hai-service/src/main/java/com/hai/config/MessageConfig.java
  13. 49
      hai-service/src/main/java/com/hai/dao/HighChildOrderMapper.java
  14. 14
      hai-service/src/main/java/com/hai/dao/HighChildOrderSqlProvider.java
  15. 30
      hai-service/src/main/java/com/hai/dao/HighOrderMapper.java
  16. 44
      hai-service/src/main/java/com/hai/dao/HighOrderSqlProvider.java
  17. 128
      hai-service/src/main/java/com/hai/dao/HighUserLoginLogMapper.java
  18. 7
      hai-service/src/main/java/com/hai/dao/HighUserLoginLogMapperExt.java
  19. 346
      hai-service/src/main/java/com/hai/dao/HighUserLoginLogSqlProvider.java
  20. 16
      hai-service/src/main/java/com/hai/entity/HighChildOrder.java
  21. 60
      hai-service/src/main/java/com/hai/entity/HighChildOrderExample.java
  22. 52
      hai-service/src/main/java/com/hai/entity/HighOrder.java
  23. 168
      hai-service/src/main/java/com/hai/entity/HighOrderExample.java
  24. 257
      hai-service/src/main/java/com/hai/entity/HighUserLoginLog.java
  25. 1093
      hai-service/src/main/java/com/hai/entity/HighUserLoginLogExample.java
  26. 53
      hai-service/src/main/java/com/hai/enum_type/LoginPlatform.java
  27. 53
      hai-service/src/main/java/com/hai/enum_type/RedisFileFolder.java
  28. 34
      hai-service/src/main/java/com/hai/model/UserModel.java
  29. 5
      hai-service/src/main/java/com/hai/order/service/impl/OrderCreateHandleServiceImpl.java
  30. 2
      hai-service/src/main/java/com/hai/order/service/impl/OrderPaySuccessServiceImpl.java
  31. 23
      hai-service/src/main/java/com/hai/order/service/impl/OrderServiceImpl.java
  32. 11
      hai-service/src/main/java/com/hai/order/utils/OrderUtil.java
  33. 2
      hai-service/src/main/java/com/hai/service/HighOrderService.java
  34. 11
      hai-service/src/main/java/com/hai/service/HighUserService.java
  35. 6
      hai-service/src/main/java/com/hai/service/impl/HighOrderServiceImpl.java
  36. 2
      hai-service/src/main/java/com/hai/service/impl/HighQzOrderServiceImpl.java
  37. 73
      hai-service/src/main/java/com/hai/service/impl/HighUserServiceImpl.java
  38. 61
      hai-user/pom.xml
  39. 30
      hai-user/src/main/java/com/UserApplication.java
  40. 85
      hai-user/src/main/java/com/web/config/AuthConfig.java
  41. 23
      hai-user/src/main/java/com/web/config/ConfigListener.java
  42. 49
      hai-user/src/main/java/com/web/config/CorsConfig.java
  43. 26
      hai-user/src/main/java/com/web/config/MultipartConfig.java
  44. 110
      hai-user/src/main/java/com/web/config/RedisConfig.java
  45. 23
      hai-user/src/main/java/com/web/config/SentinelFilterConfig.java
  46. 47
      hai-user/src/main/java/com/web/config/SwaggerConfig.java
  47. 21
      hai-user/src/main/java/com/web/config/SysConfig.java
  48. 19
      hai-user/src/main/java/com/web/config/SysConst.java
  49. 31
      hai-user/src/main/java/com/web/config/WxMaConfiguration.java
  50. 75
      hai-user/src/main/java/com/web/controller/CoresController.java
  51. 1
      hai-user/src/main/java/com/web/controller/LoginController.java
  52. 1
      hai-user/src/main/java/com/web/controller/SmsController.java
  53. 1
      hai-user/src/main/java/com/web/controller/TestController.java
  54. 51
      hai-user/src/main/java/com/web/type/LoginType.java
  55. 102
      hai-user/src/main/resources/dev/application.yml
  56. 27
      hai-user/src/main/resources/dev/config.properties
  57. 93
      hai-user/src/main/resources/dev/logback.xml
  58. 1
      pom.xml

6
.gitignore vendored

@ -30,7 +30,11 @@ hai-schedule/hai-schedule.iml
v1/target/* v1/target/*
v1/log/* v1/log/*
v1/hai-schedule.iml v1/v1.iml
hai-user/target/*
hai-user/log/*
hai-user/hai-user.iml

@ -239,7 +239,7 @@ public class LoginController {
String aesStr = AESEncodeUtil.aesEncrypt(secUser.getId().toString()); String aesStr = AESEncodeUtil.aesEncrypt(secUser.getId().toString());
userInfoModel.setToken(aesStr); userInfoModel.setToken(aesStr);
SessionObject so = new SessionObject(aesStr, secUser.getObjectType(), userInfoModel); SessionObject so = new SessionObject(aesStr, secUser.getObjectType(), userInfoModel);
userCenter.save(request, response, so); userCenter.save(null,null,so);
return ResponseMsgUtil.success(so); return ResponseMsgUtil.success(so);
} catch (Exception e) { } catch (Exception e) {
log.error("login error!",e); log.error("login error!",e);

@ -293,7 +293,7 @@ public class SecRoleController {
userInfoModel.setPermissionList(permissionList); userInfoModel.setPermissionList(permissionList);
SessionObject so = new SessionObject(secUser.getId()+"", 3, userInfoModel); SessionObject so = new SessionObject(secUser.getId()+"", 3, userInfoModel);
userCenter.save(request, response, so); userCenter.save(null,null,so);
return ResponseMsgUtil.success(so); return ResponseMsgUtil.success(so);
} catch (Exception e) { } catch (Exception e) {
log.error("SecRoleController --> refreshRole() error!", e); log.error("SecRoleController --> refreshRole() error!", e);

@ -0,0 +1,75 @@
package com.cweb.controller;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.github.pagehelper.PageInfo;
import com.hai.common.exception.ErrorCode;
import com.hai.common.exception.ErrorHelp;
import com.hai.common.exception.SysCode;
import com.hai.common.utils.CoordCommonUtil;
import com.hai.common.utils.PageUtil;
import com.hai.common.utils.ResponseMsgUtil;
import com.hai.config.CommonSysConst;
import com.hai.config.TuanYouConfig;
import com.hai.dao.HighGasOrderPushMapper;
import com.hai.entity.*;
import com.hai.enum_type.GasOilPriceStatusEnum;
import com.hai.enum_type.MerchantStoreSourceType;
import com.hai.model.HighMerchantStoreModel;
import com.hai.model.ResponseData;
import com.hai.service.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.collections4.MapUtils;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.*;
import java.util.stream.Collectors;
@Controller
@RequestMapping(value = "/gasOrder")
@Api(value = "加油订单")
public class HighGasOrderController {
private static Logger log = LoggerFactory.getLogger(HighGasOrderController.class);
@Resource
private HighGasOrderService gasOrderService;
@RequestMapping(value="/getOrderByOrderNo",method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "根据订单号查询")
public ResponseData getOrderByOrderNo(@RequestParam(name = "orderNo", required = true) String orderNo) {
try {
return ResponseMsgUtil.success(gasOrderService.getDetailByOrderNo(orderNo));
} catch (Exception e) {
log.error("HighGasOrderController -> getOrderByOrderNo() error!",e);
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value="/getOrderByChildOrderNo",method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "根据子订单号查询")
public ResponseData getOrderByChildOrderNo(@RequestParam(name = "childOrderNo", required = true) String childOrderNo) {
try {
return ResponseMsgUtil.success(gasOrderService.getDetailByChildOrderNo(childOrderNo));
} catch (Exception e) {
log.error("HighGasOrderController -> getOrderByChildOrderNo() error!",e);
return ResponseMsgUtil.exception(e);
}
}
}

@ -9,7 +9,7 @@
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>com.hgj</groupId> <groupId>com.hsg</groupId>
<artifactId>hai-order</artifactId> <artifactId>hai-order</artifactId>
<dependencies> <dependencies>

@ -218,6 +218,7 @@ public class OrderController {
} }
Map<String, Object> param = new HashMap<>(); Map<String, Object> param = new HashMap<>();
param.put("userId", userModel.getHighUser().getId());
param.put("title", title); param.put("title", title);
param.put("searchTitle", searchTitle); param.put("searchTitle", searchTitle);
param.put("orderNo", orderNo); param.put("orderNo", orderNo);

@ -17,6 +17,7 @@ import com.hai.entity.*;
import com.hai.enum_type.GasChannel; import com.hai.enum_type.GasChannel;
import com.hai.enum_type.GasChannelPayPlatformType; import com.hai.enum_type.GasChannelPayPlatformType;
import com.hai.enum_type.MerchantStoreSourceType; import com.hai.enum_type.MerchantStoreSourceType;
import com.hai.enum_type.UserCardType;
import com.hai.model.HighMerchantStoreModel; import com.hai.model.HighMerchantStoreModel;
import com.hai.model.HighUserModel; import com.hai.model.HighUserModel;
import com.hai.model.ResponseData; import com.hai.model.ResponseData;
@ -100,7 +101,6 @@ public class OrderPayController {
if (body == null if (body == null
|| StringUtils.isBlank(body.getString("orderNo")) || StringUtils.isBlank(body.getString("orderNo"))
// || body.getInteger("openIdType") == null // || body.getInteger("openIdType") == null
|| StringUtils.isBlank(body.getString("orderScene"))
|| StringUtils.isBlank(body.getString("openId")) || StringUtils.isBlank(body.getString("openId"))
) { ) {
log.error("wxPay error!", "参数错误"); log.error("wxPay error!", "参数错误");
@ -218,7 +218,7 @@ public class OrderPayController {
weChatPayReqInfo.setSpbill_create_ip("122.9.135.148"); // 终端ip weChatPayReqInfo.setSpbill_create_ip("122.9.135.148"); // 终端ip
weChatPayReqInfo.setNotify_url(SysConst.getSysConfig().getWxPayNotifyUrl()); // 通知url weChatPayReqInfo.setNotify_url(SysConst.getSysConfig().getWxPayNotifyUrl()); // 通知url
weChatPayReqInfo.setTrade_type("JSAPI"); // 交易类型 weChatPayReqInfo.setTrade_type("JSAPI"); // 交易类型
weChatPayReqInfo.setAttach(body.getString("orderScene")); // 附件参数 weChatPayReqInfo.setAttach(null); // 附件参数
weChatPayReqInfo.setProfit_sharing(profitSharing); // 是否分账 Y:是 N:否 weChatPayReqInfo.setProfit_sharing(profitSharing); // 是否分账 Y:是 N:否
//附加数据,区分订单类型 //附加数据,区分订单类型
@ -240,6 +240,70 @@ public class OrderPayController {
} }
} }
@RequestMapping(value="/cardPay",method = RequestMethod.POST)
@ResponseBody
@ApiOperation(value = "卡支付")
public ResponseData cardPay(@RequestBody JSONObject body) {
try {
if (body == null
|| StringUtils.isBlank(body.getString("orderNo"))
|| StringUtils.isBlank(body.getString("cardNo"))
|| StringUtils.isBlank(body.getString("password"))) {
log.error("oilCardPay error!", "参数错误");
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, "");
}
// 获取当前操作人信息
HighUserModel userInfoModel = userCenter.getSessionModel(HighUserModel.class);
if (userInfoModel == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.SEC_USER_EXPIRED, "");
}
String password = body.getString("password");
// 查询用户与卡号的关系
HighUserCard userCard = userCardService.getDetailByUserCardNo(userInfoModel.getHighUser().getId(), body.getString("cardNo"));
if (userCard == null) {
log.error("OrderController --> cardPay() ERROR", "未绑定卡号");
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未绑定卡号");
}
// 查询用户支付密码
HighUserPayPassword userPayPassword = userPayPasswordService.getDetailByUser(userInfoModel.getHighUser().getId());
if (userPayPassword == null) {
log.error("cardPay error!", "未设置支付密码");
throw ErrorHelp.genException(SysCode.System, ErrorCode.NOT_SET_USER_PAY_PWD, "");
}
if (StringUtils.isBlank(password)) {
log.error("cardPay error!", "未输入支付密码");
throw ErrorHelp.genException(SysCode.System, ErrorCode.NOT_ENTER_USER_PAY_PWD, "");
}
// 支付密码是否正确
if (!AESEncodeUtil.aesEncrypt(password).equals(userPayPassword.getPassword())) {
log.error("cardPay error!", "");
throw ErrorHelp.genException(SysCode.System, ErrorCode.USER_PAY_PWD_ERROR, "");
}
// 查询订单
HighOrder order = orderService.getOrderDetailByNo(body.getString("orderNo"));
if(!order.getOrderStatus().equals(OrderStatus.STATUS1.getNumber())) {
log.error("OrderController --> cardPay() ERROR", "订单不处于待支付状态");
throw ErrorHelp.genException(SysCode.System, ErrorCode.ORDER_NO_STAY_PAY, "");
}
if (userCard.getType().equals(UserCardType.type1.getType())) {
return ResponseMsgUtil.success(orderPayService.hltCardPay(order, userCard));
} else if (userCard.getType().equals(UserCardType.type2.getType())) {
return ResponseMsgUtil.success(orderPayService.oilCardPay(order, userCard));
} else {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的卡号类型");
}
} catch (Exception e) {
log.error("OrderPayController -> cardPay() error!",e);
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value="/oilCardPay",method = RequestMethod.POST) @RequestMapping(value="/oilCardPay",method = RequestMethod.POST)
@ResponseBody @ResponseBody
@ApiOperation(value = "嗨森逛油卡支付") @ApiOperation(value = "嗨森逛油卡支付")

@ -53,16 +53,18 @@ spring:
#MQTT默认的消息推送主题,实际可在调用接口是指定 #MQTT默认的消息推送主题,实际可在调用接口是指定
# default: # default:
# topic: topic # topic: topic
#配置日期返回至前台为时间戳
jackson:
serialization:
write-dates-as-timestamps: true
rocketmq: rocketmq:
name-server: 139.159.177.244:9876 name-server: 139.159.177.244:9876
producer: producer:
#必须指定group #必须指定group
group: default-group group: default-group
#配置日期返回至前台为时间戳
jackson:
serialization:
write-dates-as-timestamps: true
mybatis: mybatis:
mapperLocations: mapperLocations:
- classpath*:sqlmap*/*.xml - classpath*:sqlmap*/*.xml

@ -10,7 +10,7 @@ public class SessionObject {
private String uniqueCode; private String uniqueCode;
/** /**
* 1:会员2渠道3.管理 * 1: 用户 2管理
*/ */
private Integer type; private Integer type;

@ -0,0 +1,30 @@
package com.hai.common.utils;
import com.alibaba.fastjson.JSONObject;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* 百度工具
* @className: BaiduUtis
* @author: HuRui
* @date: 2022/10/21
**/
public class BaiduUtils {
private static Logger log = LoggerFactory.getLogger(BaiduUtils.class);
/**
* IP 定位
* @param ip ip地址
* @return
*/
public static JSONObject ipLocation(String ip) {
JSONObject response = HttpsUtils.doGet("https://api.map.baidu.com/location/ip?ak=X4sSdXsohVOMb1tNiLZloD9ows5FaNjq&ip=" + ip);
log.info(response.toJSONString());
return response;
}
}

@ -7,17 +7,33 @@ import javax.servlet.http.HttpServletRequest;
public class RequestUtils { public class RequestUtils {
public static String getIpAddress(HttpServletRequest request) { public static String getIpAddress(HttpServletRequest request) {
// 获取请求主机IP地址,如果通过代理进来,则透过防火墙获取真实IP地址 String ip = request.getHeader("X-Forwarded-For");
String ip = request.getHeader("x-forwarded-for"); if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
if(ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) { if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
ip = request.getHeader("Proxy-Client-IP"); ip = request.getHeader("Proxy-Client-IP");
} }
if(ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) { if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
ip = request.getHeader("WL-Proxy-Client-IP"); ip = request.getHeader("WL-Proxy-Client-IP");
} }
if(ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) { if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
ip = request.getHeader("HTTP_CLIENT_IP");
}
if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
ip = request.getHeader("HTTP_X_FORWARDED_FOR");
}
if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
ip = request.getRemoteAddr(); ip = request.getRemoteAddr();
} }
} else if (ip.length() > 15) {
String[] ips = ip.split(",");
for (int index = 0; index < ips.length; index++) {
String strIp = ips[index];
if (!("unknown".equalsIgnoreCase(strIp))) {
ip = strIp;
break;
}
}
}
return ip; return ip;
} }

@ -1,5 +1,6 @@
package com.hai.config; package com.hai.config;
import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.ObjectMapper;
import com.hai.common.exception.ErrorCode; import com.hai.common.exception.ErrorCode;
import com.hai.common.exception.ErrorHelp; import com.hai.common.exception.ErrorHelp;
@ -56,9 +57,72 @@ public class MessageConfig {
*/ */
private static final HostnameVerifier DO_NOT_VERIFY = (hostname, session) -> true; private static final HostnameVerifier DO_NOT_VERIFY = (hostname, session) -> true;
private static final String reqUrl = "https://139.9.32.119:18312/common/sms/sendTemplateMessage";
private static final String account = "760887";
private static final String password = "Z.o'&mO%7_?5M,Br";
@Resource @Resource
private RedisUtil redisUtil; private RedisUtil redisUtil;
public static void req(String phone,String smsCode, String HWMSG) throws Exception {
HttpsURLConnection connection;
InputStream is = null;
BufferedReader br = null;
try {
// ip:port根据实际情况填写
Map<String, String> templateParas = new HashMap<>();
templateParas.put("code", smsCode);
trustAllHttpsCertificates();
URL realUrl = new URL(reqUrl);
connection = (HttpsURLConnection) realUrl.openConnection();
connection.setHostnameVerifier(DO_NOT_VERIFY);
connection.setDoInput(true); // 设置可输入
connection.setDoOutput(true); // 设置该连接是可以输出的
connection.setRequestMethod("POST"); // 设置请求方式
connection.setRequestProperty("Content-Type", "application/json;charset=UTF-8");
// 如果请求正文不包含签名名称,则设置签名为空
Map<String, Object> body = buildRequestBody(phone, HWMSG, templateParas, account, password);
if (null == body || body.isEmpty()) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "参数校验失败");
}
ObjectMapper objectMapper = new ObjectMapper();
PrintWriter pw = new PrintWriter(new OutputStreamWriter(connection.getOutputStream(), "UTF-8"));
pw.write(objectMapper.writeValueAsString(body));
pw.flush();
pw.close();
int status = connection.getResponseCode();
if (200 == status) { // 200
is = connection.getInputStream();
} else { // 400/401
is = connection.getErrorStream();
}
br = new BufferedReader(new InputStreamReader(is, "UTF-8"));
String line = null;
StringBuilder result = new StringBuilder();
while ((line = br.readLine()) != null) { // 读取数据
result.append(line + "");
}
JSONObject resultObject = JSONObject.parseObject(result.toString());
if (result == null
|| resultObject.getJSONArray("resultLists") == null
|| resultObject.getJSONArray("resultLists").size() == 0) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "短信发送失败,请稍后重试");
}
System.out.println(result.toString());
connection.disconnect();
} catch (Exception e) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "短信发送失败,请稍后重试");
} finally {
is.close();
br.close();
}
}
/** /**
* @Author Sum1Dream * @Author Sum1Dream
* @name sendSmsCodeHw.java * @name sendSmsCodeHw.java

@ -48,15 +48,16 @@ public interface HighChildOrderMapper extends HighChildOrderMapperExt {
"goods_img, goods_spec_name, ", "goods_img, goods_spec_name, ",
"goods_price, goods_actual_price, ", "goods_price, goods_actual_price, ",
"total_price, total_actual_price, ", "total_price, total_actual_price, ",
"sale_count, surplus_refund_num, ", "total_deduction_price, sale_count, ",
"surplus_refund_price, surplus_refund_integral, ", "surplus_refund_num, surplus_refund_price, ",
"channel_order_no, giveaway_type, ", "surplus_refund_integral, channel_order_no, ",
"child_order_status, praise_status, ", "giveaway_type, child_order_status, ",
"create_time, pay_time, ", "praise_status, create_time, ",
"finish_time, refund_time, ", "pay_time, finish_time, ",
"refund_remarks, cancel_time, ", "refund_time, refund_remarks, ",
"ext_1, ext_2, ext_3, ", "cancel_time, ext_1, ",
"ext_4, ext_5, ext_6)", "ext_2, ext_3, ext_4, ",
"ext_5, ext_6)",
"values (#{orderId,jdbcType=BIGINT}, #{orderNo,jdbcType=VARCHAR}, ", "values (#{orderId,jdbcType=BIGINT}, #{orderNo,jdbcType=VARCHAR}, ",
"#{memId,jdbcType=BIGINT}, #{memName,jdbcType=VARCHAR}, #{memPhone,jdbcType=VARCHAR}, ", "#{memId,jdbcType=BIGINT}, #{memName,jdbcType=VARCHAR}, #{memPhone,jdbcType=VARCHAR}, ",
"#{childOrderNo,jdbcType=VARCHAR}, #{storeId,jdbcType=BIGINT}, ", "#{childOrderNo,jdbcType=VARCHAR}, #{storeId,jdbcType=BIGINT}, ",
@ -66,15 +67,16 @@ public interface HighChildOrderMapper extends HighChildOrderMapperExt {
"#{goodsImg,jdbcType=VARCHAR}, #{goodsSpecName,jdbcType=VARCHAR}, ", "#{goodsImg,jdbcType=VARCHAR}, #{goodsSpecName,jdbcType=VARCHAR}, ",
"#{goodsPrice,jdbcType=DECIMAL}, #{goodsActualPrice,jdbcType=DECIMAL}, ", "#{goodsPrice,jdbcType=DECIMAL}, #{goodsActualPrice,jdbcType=DECIMAL}, ",
"#{totalPrice,jdbcType=DECIMAL}, #{totalActualPrice,jdbcType=DECIMAL}, ", "#{totalPrice,jdbcType=DECIMAL}, #{totalActualPrice,jdbcType=DECIMAL}, ",
"#{saleCount,jdbcType=INTEGER}, #{surplusRefundNum,jdbcType=INTEGER}, ", "#{totalDeductionPrice,jdbcType=DECIMAL}, #{saleCount,jdbcType=INTEGER}, ",
"#{surplusRefundPrice,jdbcType=DECIMAL}, #{surplusRefundIntegral,jdbcType=INTEGER}, ", "#{surplusRefundNum,jdbcType=INTEGER}, #{surplusRefundPrice,jdbcType=DECIMAL}, ",
"#{channelOrderNo,jdbcType=VARCHAR}, #{giveawayType,jdbcType=BIT}, ", "#{surplusRefundIntegral,jdbcType=INTEGER}, #{channelOrderNo,jdbcType=VARCHAR}, ",
"#{childOrderStatus,jdbcType=INTEGER}, #{praiseStatus,jdbcType=INTEGER}, ", "#{giveawayType,jdbcType=BIT}, #{childOrderStatus,jdbcType=INTEGER}, ",
"#{createTime,jdbcType=TIMESTAMP}, #{payTime,jdbcType=TIMESTAMP}, ", "#{praiseStatus,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, ",
"#{finishTime,jdbcType=TIMESTAMP}, #{refundTime,jdbcType=TIMESTAMP}, ", "#{payTime,jdbcType=TIMESTAMP}, #{finishTime,jdbcType=TIMESTAMP}, ",
"#{refundRemarks,jdbcType=VARCHAR}, #{cancelTime,jdbcType=TIMESTAMP}, ", "#{refundTime,jdbcType=TIMESTAMP}, #{refundRemarks,jdbcType=VARCHAR}, ",
"#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR}, ", "#{cancelTime,jdbcType=TIMESTAMP}, #{ext1,jdbcType=VARCHAR}, ",
"#{ext4,jdbcType=VARCHAR}, #{ext5,jdbcType=VARCHAR}, #{ext6,jdbcType=VARCHAR})" "#{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR}, #{ext4,jdbcType=VARCHAR}, ",
"#{ext5,jdbcType=VARCHAR}, #{ext6,jdbcType=VARCHAR})"
}) })
@Options(useGeneratedKeys=true,keyProperty="id") @Options(useGeneratedKeys=true,keyProperty="id")
int insert(HighChildOrder record); int insert(HighChildOrder record);
@ -105,6 +107,7 @@ public interface HighChildOrderMapper extends HighChildOrderMapperExt {
@Result(column="goods_actual_price", property="goodsActualPrice", jdbcType=JdbcType.DECIMAL), @Result(column="goods_actual_price", property="goodsActualPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="total_price", property="totalPrice", jdbcType=JdbcType.DECIMAL), @Result(column="total_price", property="totalPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="total_actual_price", property="totalActualPrice", jdbcType=JdbcType.DECIMAL), @Result(column="total_actual_price", property="totalActualPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="total_deduction_price", property="totalDeductionPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="sale_count", property="saleCount", jdbcType=JdbcType.INTEGER), @Result(column="sale_count", property="saleCount", jdbcType=JdbcType.INTEGER),
@Result(column="surplus_refund_num", property="surplusRefundNum", jdbcType=JdbcType.INTEGER), @Result(column="surplus_refund_num", property="surplusRefundNum", jdbcType=JdbcType.INTEGER),
@Result(column="surplus_refund_price", property="surplusRefundPrice", jdbcType=JdbcType.DECIMAL), @Result(column="surplus_refund_price", property="surplusRefundPrice", jdbcType=JdbcType.DECIMAL),
@ -133,10 +136,10 @@ public interface HighChildOrderMapper extends HighChildOrderMapperExt {
"id, order_id, order_no, mem_id, mem_name, mem_phone, child_order_no, store_id, ", "id, order_id, order_no, mem_id, mem_name, mem_phone, child_order_no, store_id, ",
"store_name, store_address, goods_type, goods_id, goods_name, goods_desc, goods_img, ", "store_name, store_address, goods_type, goods_id, goods_name, goods_desc, goods_img, ",
"goods_spec_name, goods_price, goods_actual_price, total_price, total_actual_price, ", "goods_spec_name, goods_price, goods_actual_price, total_price, total_actual_price, ",
"sale_count, surplus_refund_num, surplus_refund_price, surplus_refund_integral, ", "total_deduction_price, sale_count, surplus_refund_num, surplus_refund_price, ",
"channel_order_no, giveaway_type, child_order_status, praise_status, create_time, ", "surplus_refund_integral, channel_order_no, giveaway_type, child_order_status, ",
"pay_time, finish_time, refund_time, refund_remarks, cancel_time, ext_1, ext_2, ", "praise_status, create_time, pay_time, finish_time, refund_time, refund_remarks, ",
"ext_3, ext_4, ext_5, ext_6", "cancel_time, ext_1, ext_2, ext_3, ext_4, ext_5, ext_6",
"from high_child_order", "from high_child_order",
"where id = #{id,jdbcType=BIGINT}" "where id = #{id,jdbcType=BIGINT}"
}) })
@ -161,6 +164,7 @@ public interface HighChildOrderMapper extends HighChildOrderMapperExt {
@Result(column="goods_actual_price", property="goodsActualPrice", jdbcType=JdbcType.DECIMAL), @Result(column="goods_actual_price", property="goodsActualPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="total_price", property="totalPrice", jdbcType=JdbcType.DECIMAL), @Result(column="total_price", property="totalPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="total_actual_price", property="totalActualPrice", jdbcType=JdbcType.DECIMAL), @Result(column="total_actual_price", property="totalActualPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="total_deduction_price", property="totalDeductionPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="sale_count", property="saleCount", jdbcType=JdbcType.INTEGER), @Result(column="sale_count", property="saleCount", jdbcType=JdbcType.INTEGER),
@Result(column="surplus_refund_num", property="surplusRefundNum", jdbcType=JdbcType.INTEGER), @Result(column="surplus_refund_num", property="surplusRefundNum", jdbcType=JdbcType.INTEGER),
@Result(column="surplus_refund_price", property="surplusRefundPrice", jdbcType=JdbcType.DECIMAL), @Result(column="surplus_refund_price", property="surplusRefundPrice", jdbcType=JdbcType.DECIMAL),
@ -214,6 +218,7 @@ public interface HighChildOrderMapper extends HighChildOrderMapperExt {
"goods_actual_price = #{goodsActualPrice,jdbcType=DECIMAL},", "goods_actual_price = #{goodsActualPrice,jdbcType=DECIMAL},",
"total_price = #{totalPrice,jdbcType=DECIMAL},", "total_price = #{totalPrice,jdbcType=DECIMAL},",
"total_actual_price = #{totalActualPrice,jdbcType=DECIMAL},", "total_actual_price = #{totalActualPrice,jdbcType=DECIMAL},",
"total_deduction_price = #{totalDeductionPrice,jdbcType=DECIMAL},",
"sale_count = #{saleCount,jdbcType=INTEGER},", "sale_count = #{saleCount,jdbcType=INTEGER},",
"surplus_refund_num = #{surplusRefundNum,jdbcType=INTEGER},", "surplus_refund_num = #{surplusRefundNum,jdbcType=INTEGER},",
"surplus_refund_price = #{surplusRefundPrice,jdbcType=DECIMAL},", "surplus_refund_price = #{surplusRefundPrice,jdbcType=DECIMAL},",

@ -104,6 +104,10 @@ public class HighChildOrderSqlProvider {
sql.VALUES("total_actual_price", "#{totalActualPrice,jdbcType=DECIMAL}"); sql.VALUES("total_actual_price", "#{totalActualPrice,jdbcType=DECIMAL}");
} }
if (record.getTotalDeductionPrice() != null) {
sql.VALUES("total_deduction_price", "#{totalDeductionPrice,jdbcType=DECIMAL}");
}
if (record.getSaleCount() != null) { if (record.getSaleCount() != null) {
sql.VALUES("sale_count", "#{saleCount,jdbcType=INTEGER}"); sql.VALUES("sale_count", "#{saleCount,jdbcType=INTEGER}");
} }
@ -213,6 +217,7 @@ public class HighChildOrderSqlProvider {
sql.SELECT("goods_actual_price"); sql.SELECT("goods_actual_price");
sql.SELECT("total_price"); sql.SELECT("total_price");
sql.SELECT("total_actual_price"); sql.SELECT("total_actual_price");
sql.SELECT("total_deduction_price");
sql.SELECT("sale_count"); sql.SELECT("sale_count");
sql.SELECT("surplus_refund_num"); sql.SELECT("surplus_refund_num");
sql.SELECT("surplus_refund_price"); sql.SELECT("surplus_refund_price");
@ -330,6 +335,10 @@ public class HighChildOrderSqlProvider {
sql.SET("total_actual_price = #{record.totalActualPrice,jdbcType=DECIMAL}"); sql.SET("total_actual_price = #{record.totalActualPrice,jdbcType=DECIMAL}");
} }
if (record.getTotalDeductionPrice() != null) {
sql.SET("total_deduction_price = #{record.totalDeductionPrice,jdbcType=DECIMAL}");
}
if (record.getSaleCount() != null) { if (record.getSaleCount() != null) {
sql.SET("sale_count = #{record.saleCount,jdbcType=INTEGER}"); sql.SET("sale_count = #{record.saleCount,jdbcType=INTEGER}");
} }
@ -438,6 +447,7 @@ public class HighChildOrderSqlProvider {
sql.SET("goods_actual_price = #{record.goodsActualPrice,jdbcType=DECIMAL}"); sql.SET("goods_actual_price = #{record.goodsActualPrice,jdbcType=DECIMAL}");
sql.SET("total_price = #{record.totalPrice,jdbcType=DECIMAL}"); sql.SET("total_price = #{record.totalPrice,jdbcType=DECIMAL}");
sql.SET("total_actual_price = #{record.totalActualPrice,jdbcType=DECIMAL}"); sql.SET("total_actual_price = #{record.totalActualPrice,jdbcType=DECIMAL}");
sql.SET("total_deduction_price = #{record.totalDeductionPrice,jdbcType=DECIMAL}");
sql.SET("sale_count = #{record.saleCount,jdbcType=INTEGER}"); sql.SET("sale_count = #{record.saleCount,jdbcType=INTEGER}");
sql.SET("surplus_refund_num = #{record.surplusRefundNum,jdbcType=INTEGER}"); sql.SET("surplus_refund_num = #{record.surplusRefundNum,jdbcType=INTEGER}");
sql.SET("surplus_refund_price = #{record.surplusRefundPrice,jdbcType=DECIMAL}"); sql.SET("surplus_refund_price = #{record.surplusRefundPrice,jdbcType=DECIMAL}");
@ -544,6 +554,10 @@ public class HighChildOrderSqlProvider {
sql.SET("total_actual_price = #{totalActualPrice,jdbcType=DECIMAL}"); sql.SET("total_actual_price = #{totalActualPrice,jdbcType=DECIMAL}");
} }
if (record.getTotalDeductionPrice() != null) {
sql.SET("total_deduction_price = #{totalDeductionPrice,jdbcType=DECIMAL}");
}
if (record.getSaleCount() != null) { if (record.getSaleCount() != null) {
sql.SET("sale_count = #{saleCount,jdbcType=INTEGER}"); sql.SET("sale_count = #{saleCount,jdbcType=INTEGER}");
} }

@ -47,7 +47,8 @@ public interface HighOrderMapper extends HighOrderMapperExt {
"order_no, pay_serial_no, ", "order_no, pay_serial_no, ",
"pay_type, mem_card_id, ", "pay_type, mem_card_id, ",
"mem_card_type, mem_card_no, ", "mem_card_type, mem_card_no, ",
"total_price, deduction_price, ", "total_price, total_deduction_price, ",
"deduction_coupon_price, deduction_product_price, ",
"pay_gold, payable_price, ", "pay_gold, payable_price, ",
"pay_price, pay_real_price, ", "pay_price, pay_real_price, ",
"order_status, remarks, ", "order_status, remarks, ",
@ -69,7 +70,8 @@ public interface HighOrderMapper extends HighOrderMapperExt {
"#{orderNo,jdbcType=VARCHAR}, #{paySerialNo,jdbcType=VARCHAR}, ", "#{orderNo,jdbcType=VARCHAR}, #{paySerialNo,jdbcType=VARCHAR}, ",
"#{payType,jdbcType=INTEGER}, #{memCardId,jdbcType=BIGINT}, ", "#{payType,jdbcType=INTEGER}, #{memCardId,jdbcType=BIGINT}, ",
"#{memCardType,jdbcType=INTEGER}, #{memCardNo,jdbcType=VARCHAR}, ", "#{memCardType,jdbcType=INTEGER}, #{memCardNo,jdbcType=VARCHAR}, ",
"#{totalPrice,jdbcType=DECIMAL}, #{deductionPrice,jdbcType=DECIMAL}, ", "#{totalPrice,jdbcType=DECIMAL}, #{totalDeductionPrice,jdbcType=DECIMAL}, ",
"#{deductionCouponPrice,jdbcType=DECIMAL}, #{deductionProductPrice,jdbcType=DECIMAL}, ",
"#{payGold,jdbcType=INTEGER}, #{payablePrice,jdbcType=DECIMAL}, ", "#{payGold,jdbcType=INTEGER}, #{payablePrice,jdbcType=DECIMAL}, ",
"#{payPrice,jdbcType=DECIMAL}, #{payRealPrice,jdbcType=DECIMAL}, ", "#{payPrice,jdbcType=DECIMAL}, #{payRealPrice,jdbcType=DECIMAL}, ",
"#{orderStatus,jdbcType=INTEGER}, #{remarks,jdbcType=VARCHAR}, ", "#{orderStatus,jdbcType=INTEGER}, #{remarks,jdbcType=VARCHAR}, ",
@ -112,7 +114,9 @@ public interface HighOrderMapper extends HighOrderMapperExt {
@Result(column="mem_card_type", property="memCardType", jdbcType=JdbcType.INTEGER), @Result(column="mem_card_type", property="memCardType", jdbcType=JdbcType.INTEGER),
@Result(column="mem_card_no", property="memCardNo", jdbcType=JdbcType.VARCHAR), @Result(column="mem_card_no", property="memCardNo", jdbcType=JdbcType.VARCHAR),
@Result(column="total_price", property="totalPrice", jdbcType=JdbcType.DECIMAL), @Result(column="total_price", property="totalPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="deduction_price", property="deductionPrice", jdbcType=JdbcType.DECIMAL), @Result(column="total_deduction_price", property="totalDeductionPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="deduction_coupon_price", property="deductionCouponPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="deduction_product_price", property="deductionProductPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="pay_gold", property="payGold", jdbcType=JdbcType.INTEGER), @Result(column="pay_gold", property="payGold", jdbcType=JdbcType.INTEGER),
@Result(column="payable_price", property="payablePrice", jdbcType=JdbcType.DECIMAL), @Result(column="payable_price", property="payablePrice", jdbcType=JdbcType.DECIMAL),
@Result(column="pay_price", property="payPrice", jdbcType=JdbcType.DECIMAL), @Result(column="pay_price", property="payPrice", jdbcType=JdbcType.DECIMAL),
@ -147,12 +151,12 @@ public interface HighOrderMapper extends HighOrderMapperExt {
"select", "select",
"id, title, search_title, product_type, company_id, company_name, promote_code, ", "id, title, search_title, product_type, company_id, company_name, promote_code, ",
"mem_discount_id, mem_discount_name, mem_id, mem_name, mem_phone, order_no, pay_serial_no, ", "mem_discount_id, mem_discount_name, mem_id, mem_name, mem_phone, order_no, pay_serial_no, ",
"pay_type, mem_card_id, mem_card_type, mem_card_no, total_price, deduction_price, ", "pay_type, mem_card_id, mem_card_type, mem_card_no, total_price, total_deduction_price, ",
"pay_gold, payable_price, pay_price, pay_real_price, order_status, remarks, create_time, ", "deduction_coupon_price, deduction_product_price, pay_gold, payable_price, pay_price, ",
"surplus_refund_price, surplus_refund_integral, pay_time, finish_time, cancel_time, ", "pay_real_price, order_status, remarks, create_time, surplus_refund_price, surplus_refund_integral, ",
"cancel_remarks, refund_time, account_merchant_num, profit_sharing_status, profit_sharing_record_id, ", "pay_time, finish_time, cancel_time, cancel_remarks, refund_time, account_merchant_num, ",
"whether_check, whether_rebate, exception_status, exception_content, ext_1, ext_2, ", "profit_sharing_status, profit_sharing_record_id, whether_check, whether_rebate, ",
"ext_3, ext_4, ext_5, ext_6", "exception_status, exception_content, ext_1, ext_2, ext_3, ext_4, ext_5, ext_6",
"from high_order", "from high_order",
"where id = #{id,jdbcType=BIGINT}" "where id = #{id,jdbcType=BIGINT}"
}) })
@ -176,7 +180,9 @@ public interface HighOrderMapper extends HighOrderMapperExt {
@Result(column="mem_card_type", property="memCardType", jdbcType=JdbcType.INTEGER), @Result(column="mem_card_type", property="memCardType", jdbcType=JdbcType.INTEGER),
@Result(column="mem_card_no", property="memCardNo", jdbcType=JdbcType.VARCHAR), @Result(column="mem_card_no", property="memCardNo", jdbcType=JdbcType.VARCHAR),
@Result(column="total_price", property="totalPrice", jdbcType=JdbcType.DECIMAL), @Result(column="total_price", property="totalPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="deduction_price", property="deductionPrice", jdbcType=JdbcType.DECIMAL), @Result(column="total_deduction_price", property="totalDeductionPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="deduction_coupon_price", property="deductionCouponPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="deduction_product_price", property="deductionProductPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="pay_gold", property="payGold", jdbcType=JdbcType.INTEGER), @Result(column="pay_gold", property="payGold", jdbcType=JdbcType.INTEGER),
@Result(column="payable_price", property="payablePrice", jdbcType=JdbcType.DECIMAL), @Result(column="payable_price", property="payablePrice", jdbcType=JdbcType.DECIMAL),
@Result(column="pay_price", property="payPrice", jdbcType=JdbcType.DECIMAL), @Result(column="pay_price", property="payPrice", jdbcType=JdbcType.DECIMAL),
@ -236,7 +242,9 @@ public interface HighOrderMapper extends HighOrderMapperExt {
"mem_card_type = #{memCardType,jdbcType=INTEGER},", "mem_card_type = #{memCardType,jdbcType=INTEGER},",
"mem_card_no = #{memCardNo,jdbcType=VARCHAR},", "mem_card_no = #{memCardNo,jdbcType=VARCHAR},",
"total_price = #{totalPrice,jdbcType=DECIMAL},", "total_price = #{totalPrice,jdbcType=DECIMAL},",
"deduction_price = #{deductionPrice,jdbcType=DECIMAL},", "total_deduction_price = #{totalDeductionPrice,jdbcType=DECIMAL},",
"deduction_coupon_price = #{deductionCouponPrice,jdbcType=DECIMAL},",
"deduction_product_price = #{deductionProductPrice,jdbcType=DECIMAL},",
"pay_gold = #{payGold,jdbcType=INTEGER},", "pay_gold = #{payGold,jdbcType=INTEGER},",
"payable_price = #{payablePrice,jdbcType=DECIMAL},", "payable_price = #{payablePrice,jdbcType=DECIMAL},",
"pay_price = #{payPrice,jdbcType=DECIMAL},", "pay_price = #{payPrice,jdbcType=DECIMAL},",

@ -100,8 +100,16 @@ public class HighOrderSqlProvider {
sql.VALUES("total_price", "#{totalPrice,jdbcType=DECIMAL}"); sql.VALUES("total_price", "#{totalPrice,jdbcType=DECIMAL}");
} }
if (record.getDeductionPrice() != null) { if (record.getTotalDeductionPrice() != null) {
sql.VALUES("deduction_price", "#{deductionPrice,jdbcType=DECIMAL}"); sql.VALUES("total_deduction_price", "#{totalDeductionPrice,jdbcType=DECIMAL}");
}
if (record.getDeductionCouponPrice() != null) {
sql.VALUES("deduction_coupon_price", "#{deductionCouponPrice,jdbcType=DECIMAL}");
}
if (record.getDeductionProductPrice() != null) {
sql.VALUES("deduction_product_price", "#{deductionProductPrice,jdbcType=DECIMAL}");
} }
if (record.getPayGold() != null) { if (record.getPayGold() != null) {
@ -240,7 +248,9 @@ public class HighOrderSqlProvider {
sql.SELECT("mem_card_type"); sql.SELECT("mem_card_type");
sql.SELECT("mem_card_no"); sql.SELECT("mem_card_no");
sql.SELECT("total_price"); sql.SELECT("total_price");
sql.SELECT("deduction_price"); sql.SELECT("total_deduction_price");
sql.SELECT("deduction_coupon_price");
sql.SELECT("deduction_product_price");
sql.SELECT("pay_gold"); sql.SELECT("pay_gold");
sql.SELECT("payable_price"); sql.SELECT("payable_price");
sql.SELECT("pay_price"); sql.SELECT("pay_price");
@ -361,8 +371,16 @@ public class HighOrderSqlProvider {
sql.SET("total_price = #{record.totalPrice,jdbcType=DECIMAL}"); sql.SET("total_price = #{record.totalPrice,jdbcType=DECIMAL}");
} }
if (record.getDeductionPrice() != null) { if (record.getTotalDeductionPrice() != null) {
sql.SET("deduction_price = #{record.deductionPrice,jdbcType=DECIMAL}"); sql.SET("total_deduction_price = #{record.totalDeductionPrice,jdbcType=DECIMAL}");
}
if (record.getDeductionCouponPrice() != null) {
sql.SET("deduction_coupon_price = #{record.deductionCouponPrice,jdbcType=DECIMAL}");
}
if (record.getDeductionProductPrice() != null) {
sql.SET("deduction_product_price = #{record.deductionProductPrice,jdbcType=DECIMAL}");
} }
if (record.getPayGold() != null) { if (record.getPayGold() != null) {
@ -500,7 +518,9 @@ public class HighOrderSqlProvider {
sql.SET("mem_card_type = #{record.memCardType,jdbcType=INTEGER}"); sql.SET("mem_card_type = #{record.memCardType,jdbcType=INTEGER}");
sql.SET("mem_card_no = #{record.memCardNo,jdbcType=VARCHAR}"); sql.SET("mem_card_no = #{record.memCardNo,jdbcType=VARCHAR}");
sql.SET("total_price = #{record.totalPrice,jdbcType=DECIMAL}"); sql.SET("total_price = #{record.totalPrice,jdbcType=DECIMAL}");
sql.SET("deduction_price = #{record.deductionPrice,jdbcType=DECIMAL}"); sql.SET("total_deduction_price = #{record.totalDeductionPrice,jdbcType=DECIMAL}");
sql.SET("deduction_coupon_price = #{record.deductionCouponPrice,jdbcType=DECIMAL}");
sql.SET("deduction_product_price = #{record.deductionProductPrice,jdbcType=DECIMAL}");
sql.SET("pay_gold = #{record.payGold,jdbcType=INTEGER}"); sql.SET("pay_gold = #{record.payGold,jdbcType=INTEGER}");
sql.SET("payable_price = #{record.payablePrice,jdbcType=DECIMAL}"); sql.SET("payable_price = #{record.payablePrice,jdbcType=DECIMAL}");
sql.SET("pay_price = #{record.payPrice,jdbcType=DECIMAL}"); sql.SET("pay_price = #{record.payPrice,jdbcType=DECIMAL}");
@ -610,8 +630,16 @@ public class HighOrderSqlProvider {
sql.SET("total_price = #{totalPrice,jdbcType=DECIMAL}"); sql.SET("total_price = #{totalPrice,jdbcType=DECIMAL}");
} }
if (record.getDeductionPrice() != null) { if (record.getTotalDeductionPrice() != null) {
sql.SET("deduction_price = #{deductionPrice,jdbcType=DECIMAL}"); sql.SET("total_deduction_price = #{totalDeductionPrice,jdbcType=DECIMAL}");
}
if (record.getDeductionCouponPrice() != null) {
sql.SET("deduction_coupon_price = #{deductionCouponPrice,jdbcType=DECIMAL}");
}
if (record.getDeductionProductPrice() != null) {
sql.SET("deduction_product_price = #{deductionProductPrice,jdbcType=DECIMAL}");
} }
if (record.getPayGold() != null) { if (record.getPayGold() != null) {

@ -0,0 +1,128 @@
package com.hai.dao;
import com.hai.entity.HighUserLoginLog;
import com.hai.entity.HighUserLoginLogExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;
import org.springframework.stereotype.Repository;
/**
*
* 代码由工具生成,请勿修改!!!
* 如果需要扩展请在其父类进行扩展
*
**/
@Repository
public interface HighUserLoginLogMapper extends HighUserLoginLogMapperExt {
@SelectProvider(type=HighUserLoginLogSqlProvider.class, method="countByExample")
long countByExample(HighUserLoginLogExample example);
@DeleteProvider(type=HighUserLoginLogSqlProvider.class, method="deleteByExample")
int deleteByExample(HighUserLoginLogExample example);
@Delete({
"delete from high_user_login_log",
"where id = #{id,jdbcType=BIGINT}"
})
int deleteByPrimaryKey(Long id);
@Insert({
"insert into high_user_login_log (user_id, user_phone, ",
"platform, ip, province_name, ",
"city_code, city_name, ",
"`status`, create_time, ",
"ext_1, ext_2, ext_3)",
"values (#{userId,jdbcType=BIGINT}, #{userPhone,jdbcType=VARCHAR}, ",
"#{platform,jdbcType=VARCHAR}, #{ip,jdbcType=VARCHAR}, #{provinceName,jdbcType=VARCHAR}, ",
"#{cityCode,jdbcType=VARCHAR}, #{cityName,jdbcType=VARCHAR}, ",
"#{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, ",
"#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})"
})
@Options(useGeneratedKeys=true,keyProperty="id")
int insert(HighUserLoginLog record);
@InsertProvider(type=HighUserLoginLogSqlProvider.class, method="insertSelective")
@Options(useGeneratedKeys=true,keyProperty="id")
int insertSelective(HighUserLoginLog record);
@SelectProvider(type=HighUserLoginLogSqlProvider.class, method="selectByExample")
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="user_id", property="userId", jdbcType=JdbcType.BIGINT),
@Result(column="user_phone", property="userPhone", jdbcType=JdbcType.VARCHAR),
@Result(column="platform", property="platform", jdbcType=JdbcType.VARCHAR),
@Result(column="ip", property="ip", jdbcType=JdbcType.VARCHAR),
@Result(column="province_name", property="provinceName", jdbcType=JdbcType.VARCHAR),
@Result(column="city_code", property="cityCode", jdbcType=JdbcType.VARCHAR),
@Result(column="city_name", property="cityName", jdbcType=JdbcType.VARCHAR),
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR)
})
List<HighUserLoginLog> selectByExample(HighUserLoginLogExample example);
@Select({
"select",
"id, user_id, user_phone, platform, ip, province_name, city_code, city_name, ",
"`status`, create_time, ext_1, ext_2, ext_3",
"from high_user_login_log",
"where id = #{id,jdbcType=BIGINT}"
})
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="user_id", property="userId", jdbcType=JdbcType.BIGINT),
@Result(column="user_phone", property="userPhone", jdbcType=JdbcType.VARCHAR),
@Result(column="platform", property="platform", jdbcType=JdbcType.VARCHAR),
@Result(column="ip", property="ip", jdbcType=JdbcType.VARCHAR),
@Result(column="province_name", property="provinceName", jdbcType=JdbcType.VARCHAR),
@Result(column="city_code", property="cityCode", jdbcType=JdbcType.VARCHAR),
@Result(column="city_name", property="cityName", jdbcType=JdbcType.VARCHAR),
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR)
})
HighUserLoginLog selectByPrimaryKey(Long id);
@UpdateProvider(type=HighUserLoginLogSqlProvider.class, method="updateByExampleSelective")
int updateByExampleSelective(@Param("record") HighUserLoginLog record, @Param("example") HighUserLoginLogExample example);
@UpdateProvider(type=HighUserLoginLogSqlProvider.class, method="updateByExample")
int updateByExample(@Param("record") HighUserLoginLog record, @Param("example") HighUserLoginLogExample example);
@UpdateProvider(type=HighUserLoginLogSqlProvider.class, method="updateByPrimaryKeySelective")
int updateByPrimaryKeySelective(HighUserLoginLog record);
@Update({
"update high_user_login_log",
"set user_id = #{userId,jdbcType=BIGINT},",
"user_phone = #{userPhone,jdbcType=VARCHAR},",
"platform = #{platform,jdbcType=VARCHAR},",
"ip = #{ip,jdbcType=VARCHAR},",
"province_name = #{provinceName,jdbcType=VARCHAR},",
"city_code = #{cityCode,jdbcType=VARCHAR},",
"city_name = #{cityName,jdbcType=VARCHAR},",
"`status` = #{status,jdbcType=INTEGER},",
"create_time = #{createTime,jdbcType=TIMESTAMP},",
"ext_1 = #{ext1,jdbcType=VARCHAR},",
"ext_2 = #{ext2,jdbcType=VARCHAR},",
"ext_3 = #{ext3,jdbcType=VARCHAR}",
"where id = #{id,jdbcType=BIGINT}"
})
int updateByPrimaryKey(HighUserLoginLog record);
}

@ -0,0 +1,7 @@
package com.hai.dao;
/**
* mapper扩展类
*/
public interface HighUserLoginLogMapperExt {
}

@ -0,0 +1,346 @@
package com.hai.dao;
import com.hai.entity.HighUserLoginLog;
import com.hai.entity.HighUserLoginLogExample.Criteria;
import com.hai.entity.HighUserLoginLogExample.Criterion;
import com.hai.entity.HighUserLoginLogExample;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.jdbc.SQL;
public class HighUserLoginLogSqlProvider {
public String countByExample(HighUserLoginLogExample example) {
SQL sql = new SQL();
sql.SELECT("count(*)").FROM("high_user_login_log");
applyWhere(sql, example, false);
return sql.toString();
}
public String deleteByExample(HighUserLoginLogExample example) {
SQL sql = new SQL();
sql.DELETE_FROM("high_user_login_log");
applyWhere(sql, example, false);
return sql.toString();
}
public String insertSelective(HighUserLoginLog record) {
SQL sql = new SQL();
sql.INSERT_INTO("high_user_login_log");
if (record.getUserId() != null) {
sql.VALUES("user_id", "#{userId,jdbcType=BIGINT}");
}
if (record.getUserPhone() != null) {
sql.VALUES("user_phone", "#{userPhone,jdbcType=VARCHAR}");
}
if (record.getPlatform() != null) {
sql.VALUES("platform", "#{platform,jdbcType=VARCHAR}");
}
if (record.getIp() != null) {
sql.VALUES("ip", "#{ip,jdbcType=VARCHAR}");
}
if (record.getProvinceName() != null) {
sql.VALUES("province_name", "#{provinceName,jdbcType=VARCHAR}");
}
if (record.getCityCode() != null) {
sql.VALUES("city_code", "#{cityCode,jdbcType=VARCHAR}");
}
if (record.getCityName() != null) {
sql.VALUES("city_name", "#{cityName,jdbcType=VARCHAR}");
}
if (record.getStatus() != null) {
sql.VALUES("`status`", "#{status,jdbcType=INTEGER}");
}
if (record.getCreateTime() != null) {
sql.VALUES("create_time", "#{createTime,jdbcType=TIMESTAMP}");
}
if (record.getExt1() != null) {
sql.VALUES("ext_1", "#{ext1,jdbcType=VARCHAR}");
}
if (record.getExt2() != null) {
sql.VALUES("ext_2", "#{ext2,jdbcType=VARCHAR}");
}
if (record.getExt3() != null) {
sql.VALUES("ext_3", "#{ext3,jdbcType=VARCHAR}");
}
return sql.toString();
}
public String selectByExample(HighUserLoginLogExample example) {
SQL sql = new SQL();
if (example != null && example.isDistinct()) {
sql.SELECT_DISTINCT("id");
} else {
sql.SELECT("id");
}
sql.SELECT("user_id");
sql.SELECT("user_phone");
sql.SELECT("platform");
sql.SELECT("ip");
sql.SELECT("province_name");
sql.SELECT("city_code");
sql.SELECT("city_name");
sql.SELECT("`status`");
sql.SELECT("create_time");
sql.SELECT("ext_1");
sql.SELECT("ext_2");
sql.SELECT("ext_3");
sql.FROM("high_user_login_log");
applyWhere(sql, example, false);
if (example != null && example.getOrderByClause() != null) {
sql.ORDER_BY(example.getOrderByClause());
}
return sql.toString();
}
public String updateByExampleSelective(Map<String, Object> parameter) {
HighUserLoginLog record = (HighUserLoginLog) parameter.get("record");
HighUserLoginLogExample example = (HighUserLoginLogExample) parameter.get("example");
SQL sql = new SQL();
sql.UPDATE("high_user_login_log");
if (record.getId() != null) {
sql.SET("id = #{record.id,jdbcType=BIGINT}");
}
if (record.getUserId() != null) {
sql.SET("user_id = #{record.userId,jdbcType=BIGINT}");
}
if (record.getUserPhone() != null) {
sql.SET("user_phone = #{record.userPhone,jdbcType=VARCHAR}");
}
if (record.getPlatform() != null) {
sql.SET("platform = #{record.platform,jdbcType=VARCHAR}");
}
if (record.getIp() != null) {
sql.SET("ip = #{record.ip,jdbcType=VARCHAR}");
}
if (record.getProvinceName() != null) {
sql.SET("province_name = #{record.provinceName,jdbcType=VARCHAR}");
}
if (record.getCityCode() != null) {
sql.SET("city_code = #{record.cityCode,jdbcType=VARCHAR}");
}
if (record.getCityName() != null) {
sql.SET("city_name = #{record.cityName,jdbcType=VARCHAR}");
}
if (record.getStatus() != null) {
sql.SET("`status` = #{record.status,jdbcType=INTEGER}");
}
if (record.getCreateTime() != null) {
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}");
}
if (record.getExt1() != null) {
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}");
}
if (record.getExt2() != null) {
sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}");
}
if (record.getExt3() != null) {
sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}");
}
applyWhere(sql, example, true);
return sql.toString();
}
public String updateByExample(Map<String, Object> parameter) {
SQL sql = new SQL();
sql.UPDATE("high_user_login_log");
sql.SET("id = #{record.id,jdbcType=BIGINT}");
sql.SET("user_id = #{record.userId,jdbcType=BIGINT}");
sql.SET("user_phone = #{record.userPhone,jdbcType=VARCHAR}");
sql.SET("platform = #{record.platform,jdbcType=VARCHAR}");
sql.SET("ip = #{record.ip,jdbcType=VARCHAR}");
sql.SET("province_name = #{record.provinceName,jdbcType=VARCHAR}");
sql.SET("city_code = #{record.cityCode,jdbcType=VARCHAR}");
sql.SET("city_name = #{record.cityName,jdbcType=VARCHAR}");
sql.SET("`status` = #{record.status,jdbcType=INTEGER}");
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}");
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}");
sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}");
sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}");
HighUserLoginLogExample example = (HighUserLoginLogExample) parameter.get("example");
applyWhere(sql, example, true);
return sql.toString();
}
public String updateByPrimaryKeySelective(HighUserLoginLog record) {
SQL sql = new SQL();
sql.UPDATE("high_user_login_log");
if (record.getUserId() != null) {
sql.SET("user_id = #{userId,jdbcType=BIGINT}");
}
if (record.getUserPhone() != null) {
sql.SET("user_phone = #{userPhone,jdbcType=VARCHAR}");
}
if (record.getPlatform() != null) {
sql.SET("platform = #{platform,jdbcType=VARCHAR}");
}
if (record.getIp() != null) {
sql.SET("ip = #{ip,jdbcType=VARCHAR}");
}
if (record.getProvinceName() != null) {
sql.SET("province_name = #{provinceName,jdbcType=VARCHAR}");
}
if (record.getCityCode() != null) {
sql.SET("city_code = #{cityCode,jdbcType=VARCHAR}");
}
if (record.getCityName() != null) {
sql.SET("city_name = #{cityName,jdbcType=VARCHAR}");
}
if (record.getStatus() != null) {
sql.SET("`status` = #{status,jdbcType=INTEGER}");
}
if (record.getCreateTime() != null) {
sql.SET("create_time = #{createTime,jdbcType=TIMESTAMP}");
}
if (record.getExt1() != null) {
sql.SET("ext_1 = #{ext1,jdbcType=VARCHAR}");
}
if (record.getExt2() != null) {
sql.SET("ext_2 = #{ext2,jdbcType=VARCHAR}");
}
if (record.getExt3() != null) {
sql.SET("ext_3 = #{ext3,jdbcType=VARCHAR}");
}
sql.WHERE("id = #{id,jdbcType=BIGINT}");
return sql.toString();
}
protected void applyWhere(SQL sql, HighUserLoginLogExample example, boolean includeExamplePhrase) {
if (example == null) {
return;
}
String parmPhrase1;
String parmPhrase1_th;
String parmPhrase2;
String parmPhrase2_th;
String parmPhrase3;
String parmPhrase3_th;
if (includeExamplePhrase) {
parmPhrase1 = "%s #{example.oredCriteria[%d].allCriteria[%d].value}";
parmPhrase1_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}";
parmPhrase2 = "%s #{example.oredCriteria[%d].allCriteria[%d].value} and #{example.oredCriteria[%d].criteria[%d].secondValue}";
parmPhrase2_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{example.oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}";
parmPhrase3 = "#{example.oredCriteria[%d].allCriteria[%d].value[%d]}";
parmPhrase3_th = "#{example.oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}";
} else {
parmPhrase1 = "%s #{oredCriteria[%d].allCriteria[%d].value}";
parmPhrase1_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}";
parmPhrase2 = "%s #{oredCriteria[%d].allCriteria[%d].value} and #{oredCriteria[%d].criteria[%d].secondValue}";
parmPhrase2_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}";
parmPhrase3 = "#{oredCriteria[%d].allCriteria[%d].value[%d]}";
parmPhrase3_th = "#{oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}";
}
StringBuilder sb = new StringBuilder();
List<Criteria> oredCriteria = example.getOredCriteria();
boolean firstCriteria = true;
for (int i = 0; i < oredCriteria.size(); i++) {
Criteria criteria = oredCriteria.get(i);
if (criteria.isValid()) {
if (firstCriteria) {
firstCriteria = false;
} else {
sb.append(" or ");
}
sb.append('(');
List<Criterion> criterions = criteria.getAllCriteria();
boolean firstCriterion = true;
for (int j = 0; j < criterions.size(); j++) {
Criterion criterion = criterions.get(j);
if (firstCriterion) {
firstCriterion = false;
} else {
sb.append(" and ");
}
if (criterion.isNoValue()) {
sb.append(criterion.getCondition());
} else if (criterion.isSingleValue()) {
if (criterion.getTypeHandler() == null) {
sb.append(String.format(parmPhrase1, criterion.getCondition(), i, j));
} else {
sb.append(String.format(parmPhrase1_th, criterion.getCondition(), i, j,criterion.getTypeHandler()));
}
} else if (criterion.isBetweenValue()) {
if (criterion.getTypeHandler() == null) {
sb.append(String.format(parmPhrase2, criterion.getCondition(), i, j, i, j));
} else {
sb.append(String.format(parmPhrase2_th, criterion.getCondition(), i, j, criterion.getTypeHandler(), i, j, criterion.getTypeHandler()));
}
} else if (criterion.isListValue()) {
sb.append(criterion.getCondition());
sb.append(" (");
List<?> listItems = (List<?>) criterion.getValue();
boolean comma = false;
for (int k = 0; k < listItems.size(); k++) {
if (comma) {
sb.append(", ");
} else {
comma = true;
}
if (criterion.getTypeHandler() == null) {
sb.append(String.format(parmPhrase3, i, j, k));
} else {
sb.append(String.format(parmPhrase3_th, i, j, k, criterion.getTypeHandler()));
}
}
sb.append(')');
}
}
sb.append(')');
}
}
if (sb.length() > 0) {
sql.WHERE(sb.toString());
}
}
}

@ -124,6 +124,11 @@ public class HighChildOrder implements Serializable {
*/ */
private BigDecimal totalActualPrice; private BigDecimal totalActualPrice;
/**
* 商品总优惠金额
*/
private BigDecimal totalDeductionPrice;
/** /**
* 商品的数量 * 商品的数量
*/ */
@ -375,6 +380,14 @@ public class HighChildOrder implements Serializable {
this.totalActualPrice = totalActualPrice; this.totalActualPrice = totalActualPrice;
} }
public BigDecimal getTotalDeductionPrice() {
return totalDeductionPrice;
}
public void setTotalDeductionPrice(BigDecimal totalDeductionPrice) {
this.totalDeductionPrice = totalDeductionPrice;
}
public Integer getSaleCount() { public Integer getSaleCount() {
return saleCount; return saleCount;
} }
@ -567,6 +580,7 @@ public class HighChildOrder implements Serializable {
&& (this.getGoodsActualPrice() == null ? other.getGoodsActualPrice() == null : this.getGoodsActualPrice().equals(other.getGoodsActualPrice())) && (this.getGoodsActualPrice() == null ? other.getGoodsActualPrice() == null : this.getGoodsActualPrice().equals(other.getGoodsActualPrice()))
&& (this.getTotalPrice() == null ? other.getTotalPrice() == null : this.getTotalPrice().equals(other.getTotalPrice())) && (this.getTotalPrice() == null ? other.getTotalPrice() == null : this.getTotalPrice().equals(other.getTotalPrice()))
&& (this.getTotalActualPrice() == null ? other.getTotalActualPrice() == null : this.getTotalActualPrice().equals(other.getTotalActualPrice())) && (this.getTotalActualPrice() == null ? other.getTotalActualPrice() == null : this.getTotalActualPrice().equals(other.getTotalActualPrice()))
&& (this.getTotalDeductionPrice() == null ? other.getTotalDeductionPrice() == null : this.getTotalDeductionPrice().equals(other.getTotalDeductionPrice()))
&& (this.getSaleCount() == null ? other.getSaleCount() == null : this.getSaleCount().equals(other.getSaleCount())) && (this.getSaleCount() == null ? other.getSaleCount() == null : this.getSaleCount().equals(other.getSaleCount()))
&& (this.getSurplusRefundNum() == null ? other.getSurplusRefundNum() == null : this.getSurplusRefundNum().equals(other.getSurplusRefundNum())) && (this.getSurplusRefundNum() == null ? other.getSurplusRefundNum() == null : this.getSurplusRefundNum().equals(other.getSurplusRefundNum()))
&& (this.getSurplusRefundPrice() == null ? other.getSurplusRefundPrice() == null : this.getSurplusRefundPrice().equals(other.getSurplusRefundPrice())) && (this.getSurplusRefundPrice() == null ? other.getSurplusRefundPrice() == null : this.getSurplusRefundPrice().equals(other.getSurplusRefundPrice()))
@ -613,6 +627,7 @@ public class HighChildOrder implements Serializable {
result = prime * result + ((getGoodsActualPrice() == null) ? 0 : getGoodsActualPrice().hashCode()); result = prime * result + ((getGoodsActualPrice() == null) ? 0 : getGoodsActualPrice().hashCode());
result = prime * result + ((getTotalPrice() == null) ? 0 : getTotalPrice().hashCode()); result = prime * result + ((getTotalPrice() == null) ? 0 : getTotalPrice().hashCode());
result = prime * result + ((getTotalActualPrice() == null) ? 0 : getTotalActualPrice().hashCode()); result = prime * result + ((getTotalActualPrice() == null) ? 0 : getTotalActualPrice().hashCode());
result = prime * result + ((getTotalDeductionPrice() == null) ? 0 : getTotalDeductionPrice().hashCode());
result = prime * result + ((getSaleCount() == null) ? 0 : getSaleCount().hashCode()); result = prime * result + ((getSaleCount() == null) ? 0 : getSaleCount().hashCode());
result = prime * result + ((getSurplusRefundNum() == null) ? 0 : getSurplusRefundNum().hashCode()); result = prime * result + ((getSurplusRefundNum() == null) ? 0 : getSurplusRefundNum().hashCode());
result = prime * result + ((getSurplusRefundPrice() == null) ? 0 : getSurplusRefundPrice().hashCode()); result = prime * result + ((getSurplusRefundPrice() == null) ? 0 : getSurplusRefundPrice().hashCode());
@ -662,6 +677,7 @@ public class HighChildOrder implements Serializable {
sb.append(", goodsActualPrice=").append(goodsActualPrice); sb.append(", goodsActualPrice=").append(goodsActualPrice);
sb.append(", totalPrice=").append(totalPrice); sb.append(", totalPrice=").append(totalPrice);
sb.append(", totalActualPrice=").append(totalActualPrice); sb.append(", totalActualPrice=").append(totalActualPrice);
sb.append(", totalDeductionPrice=").append(totalDeductionPrice);
sb.append(", saleCount=").append(saleCount); sb.append(", saleCount=").append(saleCount);
sb.append(", surplusRefundNum=").append(surplusRefundNum); sb.append(", surplusRefundNum=").append(surplusRefundNum);
sb.append(", surplusRefundPrice=").append(surplusRefundPrice); sb.append(", surplusRefundPrice=").append(surplusRefundPrice);

@ -1426,6 +1426,66 @@ public class HighChildOrderExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andTotalDeductionPriceIsNull() {
addCriterion("total_deduction_price is null");
return (Criteria) this;
}
public Criteria andTotalDeductionPriceIsNotNull() {
addCriterion("total_deduction_price is not null");
return (Criteria) this;
}
public Criteria andTotalDeductionPriceEqualTo(BigDecimal value) {
addCriterion("total_deduction_price =", value, "totalDeductionPrice");
return (Criteria) this;
}
public Criteria andTotalDeductionPriceNotEqualTo(BigDecimal value) {
addCriterion("total_deduction_price <>", value, "totalDeductionPrice");
return (Criteria) this;
}
public Criteria andTotalDeductionPriceGreaterThan(BigDecimal value) {
addCriterion("total_deduction_price >", value, "totalDeductionPrice");
return (Criteria) this;
}
public Criteria andTotalDeductionPriceGreaterThanOrEqualTo(BigDecimal value) {
addCriterion("total_deduction_price >=", value, "totalDeductionPrice");
return (Criteria) this;
}
public Criteria andTotalDeductionPriceLessThan(BigDecimal value) {
addCriterion("total_deduction_price <", value, "totalDeductionPrice");
return (Criteria) this;
}
public Criteria andTotalDeductionPriceLessThanOrEqualTo(BigDecimal value) {
addCriterion("total_deduction_price <=", value, "totalDeductionPrice");
return (Criteria) this;
}
public Criteria andTotalDeductionPriceIn(List<BigDecimal> values) {
addCriterion("total_deduction_price in", values, "totalDeductionPrice");
return (Criteria) this;
}
public Criteria andTotalDeductionPriceNotIn(List<BigDecimal> values) {
addCriterion("total_deduction_price not in", values, "totalDeductionPrice");
return (Criteria) this;
}
public Criteria andTotalDeductionPriceBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("total_deduction_price between", value1, value2, "totalDeductionPrice");
return (Criteria) this;
}
public Criteria andTotalDeductionPriceNotBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("total_deduction_price not between", value1, value2, "totalDeductionPrice");
return (Criteria) this;
}
public Criteria andSaleCountIsNull() { public Criteria andSaleCountIsNull() {
addCriterion("sale_count is null"); addCriterion("sale_count is null");
return (Criteria) this; return (Criteria) this;

@ -115,14 +115,24 @@ public class HighOrder implements Serializable {
private String memCardNo; private String memCardNo;
/** /**
* 订单总金额 * 交易总金额
*/ */
private BigDecimal totalPrice; private BigDecimal totalPrice;
/** /**
* 优惠金额 * 交易总优惠金额优惠券优惠金额+商品优惠金额
*/ */
private BigDecimal deductionPrice; private BigDecimal totalDeductionPrice;
/**
* 优惠券优惠金额
*/
private BigDecimal deductionCouponPrice;
/**
* 产品优惠金额
*/
private BigDecimal deductionProductPrice;
/** /**
* 积分抵扣 * 积分抵扣
@ -405,12 +415,28 @@ public class HighOrder implements Serializable {
this.totalPrice = totalPrice; this.totalPrice = totalPrice;
} }
public BigDecimal getDeductionPrice() { public BigDecimal getTotalDeductionPrice() {
return deductionPrice; return totalDeductionPrice;
}
public void setTotalDeductionPrice(BigDecimal totalDeductionPrice) {
this.totalDeductionPrice = totalDeductionPrice;
}
public BigDecimal getDeductionCouponPrice() {
return deductionCouponPrice;
}
public void setDeductionCouponPrice(BigDecimal deductionCouponPrice) {
this.deductionCouponPrice = deductionCouponPrice;
}
public BigDecimal getDeductionProductPrice() {
return deductionProductPrice;
} }
public void setDeductionPrice(BigDecimal deductionPrice) { public void setDeductionProductPrice(BigDecimal deductionProductPrice) {
this.deductionPrice = deductionPrice; this.deductionProductPrice = deductionProductPrice;
} }
public Integer getPayGold() { public Integer getPayGold() {
@ -660,7 +686,9 @@ public class HighOrder implements Serializable {
&& (this.getMemCardType() == null ? other.getMemCardType() == null : this.getMemCardType().equals(other.getMemCardType())) && (this.getMemCardType() == null ? other.getMemCardType() == null : this.getMemCardType().equals(other.getMemCardType()))
&& (this.getMemCardNo() == null ? other.getMemCardNo() == null : this.getMemCardNo().equals(other.getMemCardNo())) && (this.getMemCardNo() == null ? other.getMemCardNo() == null : this.getMemCardNo().equals(other.getMemCardNo()))
&& (this.getTotalPrice() == null ? other.getTotalPrice() == null : this.getTotalPrice().equals(other.getTotalPrice())) && (this.getTotalPrice() == null ? other.getTotalPrice() == null : this.getTotalPrice().equals(other.getTotalPrice()))
&& (this.getDeductionPrice() == null ? other.getDeductionPrice() == null : this.getDeductionPrice().equals(other.getDeductionPrice())) && (this.getTotalDeductionPrice() == null ? other.getTotalDeductionPrice() == null : this.getTotalDeductionPrice().equals(other.getTotalDeductionPrice()))
&& (this.getDeductionCouponPrice() == null ? other.getDeductionCouponPrice() == null : this.getDeductionCouponPrice().equals(other.getDeductionCouponPrice()))
&& (this.getDeductionProductPrice() == null ? other.getDeductionProductPrice() == null : this.getDeductionProductPrice().equals(other.getDeductionProductPrice()))
&& (this.getPayGold() == null ? other.getPayGold() == null : this.getPayGold().equals(other.getPayGold())) && (this.getPayGold() == null ? other.getPayGold() == null : this.getPayGold().equals(other.getPayGold()))
&& (this.getPayablePrice() == null ? other.getPayablePrice() == null : this.getPayablePrice().equals(other.getPayablePrice())) && (this.getPayablePrice() == null ? other.getPayablePrice() == null : this.getPayablePrice().equals(other.getPayablePrice()))
&& (this.getPayPrice() == null ? other.getPayPrice() == null : this.getPayPrice().equals(other.getPayPrice())) && (this.getPayPrice() == null ? other.getPayPrice() == null : this.getPayPrice().equals(other.getPayPrice()))
@ -713,7 +741,9 @@ public class HighOrder implements Serializable {
result = prime * result + ((getMemCardType() == null) ? 0 : getMemCardType().hashCode()); result = prime * result + ((getMemCardType() == null) ? 0 : getMemCardType().hashCode());
result = prime * result + ((getMemCardNo() == null) ? 0 : getMemCardNo().hashCode()); result = prime * result + ((getMemCardNo() == null) ? 0 : getMemCardNo().hashCode());
result = prime * result + ((getTotalPrice() == null) ? 0 : getTotalPrice().hashCode()); result = prime * result + ((getTotalPrice() == null) ? 0 : getTotalPrice().hashCode());
result = prime * result + ((getDeductionPrice() == null) ? 0 : getDeductionPrice().hashCode()); result = prime * result + ((getTotalDeductionPrice() == null) ? 0 : getTotalDeductionPrice().hashCode());
result = prime * result + ((getDeductionCouponPrice() == null) ? 0 : getDeductionCouponPrice().hashCode());
result = prime * result + ((getDeductionProductPrice() == null) ? 0 : getDeductionProductPrice().hashCode());
result = prime * result + ((getPayGold() == null) ? 0 : getPayGold().hashCode()); result = prime * result + ((getPayGold() == null) ? 0 : getPayGold().hashCode());
result = prime * result + ((getPayablePrice() == null) ? 0 : getPayablePrice().hashCode()); result = prime * result + ((getPayablePrice() == null) ? 0 : getPayablePrice().hashCode());
result = prime * result + ((getPayPrice() == null) ? 0 : getPayPrice().hashCode()); result = prime * result + ((getPayPrice() == null) ? 0 : getPayPrice().hashCode());
@ -769,7 +799,9 @@ public class HighOrder implements Serializable {
sb.append(", memCardType=").append(memCardType); sb.append(", memCardType=").append(memCardType);
sb.append(", memCardNo=").append(memCardNo); sb.append(", memCardNo=").append(memCardNo);
sb.append(", totalPrice=").append(totalPrice); sb.append(", totalPrice=").append(totalPrice);
sb.append(", deductionPrice=").append(deductionPrice); sb.append(", totalDeductionPrice=").append(totalDeductionPrice);
sb.append(", deductionCouponPrice=").append(deductionCouponPrice);
sb.append(", deductionProductPrice=").append(deductionProductPrice);
sb.append(", payGold=").append(payGold); sb.append(", payGold=").append(payGold);
sb.append(", payablePrice=").append(payablePrice); sb.append(", payablePrice=").append(payablePrice);
sb.append(", payPrice=").append(payPrice); sb.append(", payPrice=").append(payPrice);

@ -1366,63 +1366,183 @@ public class HighOrderExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andDeductionPriceIsNull() { public Criteria andTotalDeductionPriceIsNull() {
addCriterion("deduction_price is null"); addCriterion("total_deduction_price is null");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andDeductionPriceIsNotNull() { public Criteria andTotalDeductionPriceIsNotNull() {
addCriterion("deduction_price is not null"); addCriterion("total_deduction_price is not null");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andDeductionPriceEqualTo(BigDecimal value) { public Criteria andTotalDeductionPriceEqualTo(BigDecimal value) {
addCriterion("deduction_price =", value, "deductionPrice"); addCriterion("total_deduction_price =", value, "totalDeductionPrice");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andDeductionPriceNotEqualTo(BigDecimal value) { public Criteria andTotalDeductionPriceNotEqualTo(BigDecimal value) {
addCriterion("deduction_price <>", value, "deductionPrice"); addCriterion("total_deduction_price <>", value, "totalDeductionPrice");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andDeductionPriceGreaterThan(BigDecimal value) { public Criteria andTotalDeductionPriceGreaterThan(BigDecimal value) {
addCriterion("deduction_price >", value, "deductionPrice"); addCriterion("total_deduction_price >", value, "totalDeductionPrice");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andDeductionPriceGreaterThanOrEqualTo(BigDecimal value) { public Criteria andTotalDeductionPriceGreaterThanOrEqualTo(BigDecimal value) {
addCriterion("deduction_price >=", value, "deductionPrice"); addCriterion("total_deduction_price >=", value, "totalDeductionPrice");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andDeductionPriceLessThan(BigDecimal value) { public Criteria andTotalDeductionPriceLessThan(BigDecimal value) {
addCriterion("deduction_price <", value, "deductionPrice"); addCriterion("total_deduction_price <", value, "totalDeductionPrice");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andDeductionPriceLessThanOrEqualTo(BigDecimal value) { public Criteria andTotalDeductionPriceLessThanOrEqualTo(BigDecimal value) {
addCriterion("deduction_price <=", value, "deductionPrice"); addCriterion("total_deduction_price <=", value, "totalDeductionPrice");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andDeductionPriceIn(List<BigDecimal> values) { public Criteria andTotalDeductionPriceIn(List<BigDecimal> values) {
addCriterion("deduction_price in", values, "deductionPrice"); addCriterion("total_deduction_price in", values, "totalDeductionPrice");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andDeductionPriceNotIn(List<BigDecimal> values) { public Criteria andTotalDeductionPriceNotIn(List<BigDecimal> values) {
addCriterion("deduction_price not in", values, "deductionPrice"); addCriterion("total_deduction_price not in", values, "totalDeductionPrice");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andDeductionPriceBetween(BigDecimal value1, BigDecimal value2) { public Criteria andTotalDeductionPriceBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("deduction_price between", value1, value2, "deductionPrice"); addCriterion("total_deduction_price between", value1, value2, "totalDeductionPrice");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andDeductionPriceNotBetween(BigDecimal value1, BigDecimal value2) { public Criteria andTotalDeductionPriceNotBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("deduction_price not between", value1, value2, "deductionPrice"); addCriterion("total_deduction_price not between", value1, value2, "totalDeductionPrice");
return (Criteria) this;
}
public Criteria andDeductionCouponPriceIsNull() {
addCriterion("deduction_coupon_price is null");
return (Criteria) this;
}
public Criteria andDeductionCouponPriceIsNotNull() {
addCriterion("deduction_coupon_price is not null");
return (Criteria) this;
}
public Criteria andDeductionCouponPriceEqualTo(BigDecimal value) {
addCriterion("deduction_coupon_price =", value, "deductionCouponPrice");
return (Criteria) this;
}
public Criteria andDeductionCouponPriceNotEqualTo(BigDecimal value) {
addCriterion("deduction_coupon_price <>", value, "deductionCouponPrice");
return (Criteria) this;
}
public Criteria andDeductionCouponPriceGreaterThan(BigDecimal value) {
addCriterion("deduction_coupon_price >", value, "deductionCouponPrice");
return (Criteria) this;
}
public Criteria andDeductionCouponPriceGreaterThanOrEqualTo(BigDecimal value) {
addCriterion("deduction_coupon_price >=", value, "deductionCouponPrice");
return (Criteria) this;
}
public Criteria andDeductionCouponPriceLessThan(BigDecimal value) {
addCriterion("deduction_coupon_price <", value, "deductionCouponPrice");
return (Criteria) this;
}
public Criteria andDeductionCouponPriceLessThanOrEqualTo(BigDecimal value) {
addCriterion("deduction_coupon_price <=", value, "deductionCouponPrice");
return (Criteria) this;
}
public Criteria andDeductionCouponPriceIn(List<BigDecimal> values) {
addCriterion("deduction_coupon_price in", values, "deductionCouponPrice");
return (Criteria) this;
}
public Criteria andDeductionCouponPriceNotIn(List<BigDecimal> values) {
addCriterion("deduction_coupon_price not in", values, "deductionCouponPrice");
return (Criteria) this;
}
public Criteria andDeductionCouponPriceBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("deduction_coupon_price between", value1, value2, "deductionCouponPrice");
return (Criteria) this;
}
public Criteria andDeductionCouponPriceNotBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("deduction_coupon_price not between", value1, value2, "deductionCouponPrice");
return (Criteria) this;
}
public Criteria andDeductionProductPriceIsNull() {
addCriterion("deduction_product_price is null");
return (Criteria) this;
}
public Criteria andDeductionProductPriceIsNotNull() {
addCriterion("deduction_product_price is not null");
return (Criteria) this;
}
public Criteria andDeductionProductPriceEqualTo(BigDecimal value) {
addCriterion("deduction_product_price =", value, "deductionProductPrice");
return (Criteria) this;
}
public Criteria andDeductionProductPriceNotEqualTo(BigDecimal value) {
addCriterion("deduction_product_price <>", value, "deductionProductPrice");
return (Criteria) this;
}
public Criteria andDeductionProductPriceGreaterThan(BigDecimal value) {
addCriterion("deduction_product_price >", value, "deductionProductPrice");
return (Criteria) this;
}
public Criteria andDeductionProductPriceGreaterThanOrEqualTo(BigDecimal value) {
addCriterion("deduction_product_price >=", value, "deductionProductPrice");
return (Criteria) this;
}
public Criteria andDeductionProductPriceLessThan(BigDecimal value) {
addCriterion("deduction_product_price <", value, "deductionProductPrice");
return (Criteria) this;
}
public Criteria andDeductionProductPriceLessThanOrEqualTo(BigDecimal value) {
addCriterion("deduction_product_price <=", value, "deductionProductPrice");
return (Criteria) this;
}
public Criteria andDeductionProductPriceIn(List<BigDecimal> values) {
addCriterion("deduction_product_price in", values, "deductionProductPrice");
return (Criteria) this;
}
public Criteria andDeductionProductPriceNotIn(List<BigDecimal> values) {
addCriterion("deduction_product_price not in", values, "deductionProductPrice");
return (Criteria) this;
}
public Criteria andDeductionProductPriceBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("deduction_product_price between", value1, value2, "deductionProductPrice");
return (Criteria) this;
}
public Criteria andDeductionProductPriceNotBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("deduction_product_price not between", value1, value2, "deductionProductPrice");
return (Criteria) this; return (Criteria) this;
} }

@ -0,0 +1,257 @@
package com.hai.entity;
import java.io.Serializable;
import java.util.Date;
/**
* high_user_login_log
* @author
*/
/**
*
* 代码由工具生成
*
**/
public class HighUserLoginLog implements Serializable {
/**
* 主键
*/
private Long id;
/**
* 用户id
*/
private Long userId;
/**
* 用户电话
*/
private String userPhone;
/**
* 登录平台
*/
private String platform;
/**
* ip地址
*/
private String ip;
/**
* 省份名称
*/
private String provinceName;
/**
* 城市编码
*/
private String cityCode;
/**
* 城市名称
*/
private String cityName;
/**
* 状态 0删除 1正常
*/
private Integer status;
/**
* 创建时间
*/
private Date createTime;
/**
* ext_1
*/
private String ext1;
/**
* ext_2
*/
private String ext2;
/**
* ext_3
*/
private String ext3;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getUserId() {
return userId;
}
public void setUserId(Long userId) {
this.userId = userId;
}
public String getUserPhone() {
return userPhone;
}
public void setUserPhone(String userPhone) {
this.userPhone = userPhone;
}
public String getPlatform() {
return platform;
}
public void setPlatform(String platform) {
this.platform = platform;
}
public String getIp() {
return ip;
}
public void setIp(String ip) {
this.ip = ip;
}
public String getProvinceName() {
return provinceName;
}
public void setProvinceName(String provinceName) {
this.provinceName = provinceName;
}
public String getCityCode() {
return cityCode;
}
public void setCityCode(String cityCode) {
this.cityCode = cityCode;
}
public String getCityName() {
return cityName;
}
public void setCityName(String cityName) {
this.cityName = cityName;
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public String getExt1() {
return ext1;
}
public void setExt1(String ext1) {
this.ext1 = ext1;
}
public String getExt2() {
return ext2;
}
public void setExt2(String ext2) {
this.ext2 = ext2;
}
public String getExt3() {
return ext3;
}
public void setExt3(String ext3) {
this.ext3 = ext3;
}
@Override
public boolean equals(Object that) {
if (this == that) {
return true;
}
if (that == null) {
return false;
}
if (getClass() != that.getClass()) {
return false;
}
HighUserLoginLog other = (HighUserLoginLog) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
&& (this.getUserPhone() == null ? other.getUserPhone() == null : this.getUserPhone().equals(other.getUserPhone()))
&& (this.getPlatform() == null ? other.getPlatform() == null : this.getPlatform().equals(other.getPlatform()))
&& (this.getIp() == null ? other.getIp() == null : this.getIp().equals(other.getIp()))
&& (this.getProvinceName() == null ? other.getProvinceName() == null : this.getProvinceName().equals(other.getProvinceName()))
&& (this.getCityCode() == null ? other.getCityCode() == null : this.getCityCode().equals(other.getCityCode()))
&& (this.getCityName() == null ? other.getCityName() == null : this.getCityName().equals(other.getCityName()))
&& (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
&& (this.getExt1() == null ? other.getExt1() == null : this.getExt1().equals(other.getExt1()))
&& (this.getExt2() == null ? other.getExt2() == null : this.getExt2().equals(other.getExt2()))
&& (this.getExt3() == null ? other.getExt3() == null : this.getExt3().equals(other.getExt3()));
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
result = prime * result + ((getUserPhone() == null) ? 0 : getUserPhone().hashCode());
result = prime * result + ((getPlatform() == null) ? 0 : getPlatform().hashCode());
result = prime * result + ((getIp() == null) ? 0 : getIp().hashCode());
result = prime * result + ((getProvinceName() == null) ? 0 : getProvinceName().hashCode());
result = prime * result + ((getCityCode() == null) ? 0 : getCityCode().hashCode());
result = prime * result + ((getCityName() == null) ? 0 : getCityName().hashCode());
result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
result = prime * result + ((getExt1() == null) ? 0 : getExt1().hashCode());
result = prime * result + ((getExt2() == null) ? 0 : getExt2().hashCode());
result = prime * result + ((getExt3() == null) ? 0 : getExt3().hashCode());
return result;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", userId=").append(userId);
sb.append(", userPhone=").append(userPhone);
sb.append(", platform=").append(platform);
sb.append(", ip=").append(ip);
sb.append(", provinceName=").append(provinceName);
sb.append(", cityCode=").append(cityCode);
sb.append(", cityName=").append(cityName);
sb.append(", status=").append(status);
sb.append(", createTime=").append(createTime);
sb.append(", ext1=").append(ext1);
sb.append(", ext2=").append(ext2);
sb.append(", ext3=").append(ext3);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
}

@ -0,0 +1,53 @@
package com.hai.enum_type;
import java.util.Objects;
/**
* 登录平台
* @className: LoginType
* @author: HuRui
* @date: 2022/10/20
**/
public enum LoginPlatform {
H5("WEB", "H5客户端"),
WXAPPLETS("WXAPPLETS", "微信小程序"),
UNIONPAY("UNIONPAY", "云闪付"),
;
private String code;
private String name;
LoginPlatform(String code, String name) {
this.code = code;
this.name = name;
}
/**
* 根据类型查询数据
* @param code
* @return
*/
public static LoginPlatform getDataByType(String code) {
for (LoginPlatform ele : values()) {
if(Objects.equals(code,ele.getCode())) return ele;
}
return null;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}

@ -0,0 +1,53 @@
package com.hai.enum_type;
import java.util.Objects;
/**
* redis文件夹
* @className: RedisFileFolder
* @author: HuRui
* @date: 2022/10/20
**/
public enum RedisFileFolder {
SMS_CODE("SMS_CODE:", "短信验证码"),
USER("USER:", "用户信息"),
ADMIN("ADMIN:", "管理信息"),
;
private String code;
private String name;
RedisFileFolder(String code, String name) {
this.code = code;
this.name = name;
}
/**
* 根据类型查询数据
* @param code
* @return
*/
public static RedisFileFolder getDataByType(String code) {
for (RedisFileFolder ele : values()) {
if(Objects.equals(code,ele.getCode())) return ele;
}
return null;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}

@ -18,13 +18,13 @@ public class UserModel {
private Integer unusedDiscount; private Integer unusedDiscount;
// 待支付数量 // 待支付数量
private Integer unpaid; private Long unpaid;
// 待支付数量 // 待支付数量
private Long whetherCheckNum; private Long whetherCheckNum;
// 支付数量 // 支付数量
private Integer orderPayNum; private Long orderPayNum;
// 充值订单待支付数量 // 充值订单待支付数量
private Integer rechargeOrderNum; private Integer rechargeOrderNum;
@ -92,13 +92,6 @@ public class UserModel {
this.unusedDiscount = unusedDiscount; this.unusedDiscount = unusedDiscount;
} }
public Integer getUnpaid() {
return unpaid;
}
public void setUnpaid(Integer unpaid) {
this.unpaid = unpaid;
}
public Boolean getIsSetPayPwd() { public Boolean getIsSetPayPwd() {
return isSetPayPwd; return isSetPayPwd;
@ -132,13 +125,6 @@ public class UserModel {
this.rechargeOrderNum = rechargeOrderNum; this.rechargeOrderNum = rechargeOrderNum;
} }
public Integer getOrderPayNum() {
return orderPayNum;
}
public void setOrderPayNum(Integer orderPayNum) {
this.orderPayNum = orderPayNum;
}
public Boolean getSetOilCard() { public Boolean getSetOilCard() {
return isSetOilCard; return isSetOilCard;
@ -155,4 +141,20 @@ public class UserModel {
public void setWhetherCheckNum(Long whetherCheckNum) { public void setWhetherCheckNum(Long whetherCheckNum) {
this.whetherCheckNum = whetherCheckNum; this.whetherCheckNum = whetherCheckNum;
} }
public Long getUnpaid() {
return unpaid;
}
public void setUnpaid(Long unpaid) {
this.unpaid = unpaid;
}
public Long getOrderPayNum() {
return orderPayNum;
}
public void setOrderPayNum(Long orderPayNum) {
this.orderPayNum = orderPayNum;
}
} }

@ -190,6 +190,7 @@ public class OrderCreateHandleServiceImpl implements OrderCreateHandleService {
childOrder.setTotalPrice(childOrder.getGoodsPrice().multiply(new BigDecimal(childOrder.getSaleCount().toString()))); childOrder.setTotalPrice(childOrder.getGoodsPrice().multiply(new BigDecimal(childOrder.getSaleCount().toString())));
childOrder.setTotalActualPrice(childOrder.getGoodsActualPrice().multiply(new BigDecimal(childOrder.getSaleCount().toString()))); childOrder.setTotalActualPrice(childOrder.getGoodsActualPrice().multiply(new BigDecimal(childOrder.getSaleCount().toString())));
childOrder.setTotalDeductionPrice(childOrder.getTotalPrice().subtract(childOrder.getTotalActualPrice()));
childOrderList.add(childOrder); childOrderList.add(childOrder);
// 是否赠送卡卷 // 是否赠送卡卷
@ -224,7 +225,8 @@ public class OrderCreateHandleServiceImpl implements OrderCreateHandleService {
childOrder.setChildOrderStatus(OrderChildStatus.STATUS1.getNumber()); childOrder.setChildOrderStatus(OrderChildStatus.STATUS1.getNumber());
childOrder.setPraiseStatus(0); childOrder.setPraiseStatus(0);
childOrder.setTotalPrice(childOrder.getGoodsPrice().multiply(new BigDecimal(childOrder.getSaleCount().toString()))); childOrder.setTotalPrice(childOrder.getGoodsPrice().multiply(new BigDecimal(childOrder.getSaleCount().toString())));
childOrder.setTotalActualPrice(childOrder.getGoodsActualPrice().multiply(new BigDecimal(childOrder.getSaleCount().toString()))); childOrder.setTotalActualPrice(new BigDecimal("0"));
childOrder.setTotalDeductionPrice(childOrder.getTotalPrice().subtract(childOrder.getTotalActualPrice()));
childOrder.setCreateTime(new Date()); childOrder.setCreateTime(new Date());
childOrderList.add(childOrder); childOrderList.add(childOrder);
} }
@ -319,6 +321,7 @@ public class OrderCreateHandleServiceImpl implements OrderCreateHandleService {
childOrder.setChildOrderStatus(OrderChildStatus.STATUS1.getNumber()); childOrder.setChildOrderStatus(OrderChildStatus.STATUS1.getNumber());
childOrder.setTotalPrice(new BigDecimal(childOrder.getSaleCount().toString()).multiply(childOrder.getGoodsPrice())); childOrder.setTotalPrice(new BigDecimal(childOrder.getSaleCount().toString()).multiply(childOrder.getGoodsPrice()));
childOrder.setTotalActualPrice(new BigDecimal(childOrder.getSaleCount().toString()).multiply(childOrder.getGoodsActualPrice())); childOrder.setTotalActualPrice(new BigDecimal(childOrder.getSaleCount().toString()).multiply(childOrder.getGoodsActualPrice()));
childOrder.setTotalDeductionPrice(childOrder.getTotalPrice().subtract(childOrder.getTotalActualPrice()));
childOrder.setPraiseStatus(0); childOrder.setPraiseStatus(0);
childOrder.setCreateTime(new Date()); childOrder.setCreateTime(new Date());

@ -275,7 +275,7 @@ public class OrderPaySuccessServiceImpl implements OrderPaySuccessService {
gasOrder.getGasOilNo(), gasOrder.getGasOilNo(),
gasOrder.getGasGunNo(), gasOrder.getGasGunNo(),
order.getPayablePrice(), order.getPayablePrice(),
order.getDeductionPrice() order.getTotalDeductionPrice()
); );
} else if (gasOrder.getChannelType().equals(MerchantStoreSourceType.type4.getNumber())) { } else if (gasOrder.getChannelType().equals(MerchantStoreSourceType.type4.getNumber())) {

@ -143,6 +143,7 @@ public class OrderServiceImpl implements OrderService {
order.setExceptionStatus(false); order.setExceptionStatus(false);
order.setCreateTime(new Date()); order.setCreateTime(new Date());
order.setPayGold(0); order.setPayGold(0);
order.setDeductionCouponPrice(new BigDecimal("0"));
/*********** 组装处理子订单 商品业务************/ /*********** 组装处理子订单 商品业务************/
List<HighChildOrder> childOrderList = new ArrayList<>(); List<HighChildOrder> childOrderList = new ArrayList<>();
@ -216,13 +217,6 @@ public class OrderServiceImpl implements OrderService {
order.setHighChildOrderList(childOrderList); order.setHighChildOrderList(childOrderList);
/*********** 组装处理子订单 商品业务************/ /*********** 组装处理子订单 商品业务************/
// 计算订单金额
Map<String, Object> calculateOrderPrice = OrderUtil.calculateOrderPrice(order.getHighChildOrderList());
order.setTotalPrice(new BigDecimal(calculateOrderPrice.get("totalPrice").toString()));
order.setPayablePrice(new BigDecimal(calculateOrderPrice.get("payablePrice").toString()));
order.setDeductionPrice(order.getTotalPrice().subtract(order.getPayablePrice()));
order.setPayPrice(order.getPayablePrice());
// 是否使用了优惠券 // 是否使用了优惠券
if (discountUserRel != null) { if (discountUserRel != null) {
order.setMemDiscountName(discountUserRel.getHighDiscount().getDiscountName()); order.setMemDiscountName(discountUserRel.getHighDiscount().getDiscountName());
@ -254,7 +248,7 @@ public class OrderServiceImpl implements OrderService {
// 订单总额 - 满减额度 // 订单总额 - 满减额度
BigDecimal payablePrice = order.getTotalPrice().subtract(discountUserRel.getHighDiscount().getDiscountPrice()); BigDecimal payablePrice = order.getTotalPrice().subtract(discountUserRel.getHighDiscount().getDiscountPrice());
order.setDeductionPrice(discountUserRel.getHighDiscount().getDiscountPrice()); order.setDeductionCouponPrice(discountUserRel.getHighDiscount().getDiscountPrice());
// 如果总额小于0 // 如果总额小于0
if (payablePrice.compareTo(new BigDecimal("0")) < 0) { if (payablePrice.compareTo(new BigDecimal("0")) < 0) {
order.setPayablePrice(new BigDecimal("0")); order.setPayablePrice(new BigDecimal("0"));
@ -265,7 +259,7 @@ public class OrderServiceImpl implements OrderService {
else if (discountUserRel.getHighDiscount().getDiscountType() == 2) { else if (discountUserRel.getHighDiscount().getDiscountType() == 2) {
// 订单总额 - 满减额度 // 订单总额 - 满减额度
BigDecimal payablePrice = order.getTotalPrice().subtract(discountUserRel.getHighDiscount().getDiscountPrice()); BigDecimal payablePrice = order.getTotalPrice().subtract(discountUserRel.getHighDiscount().getDiscountPrice());
order.setDeductionPrice(discountUserRel.getHighDiscount().getDiscountPrice()); order.setDeductionCouponPrice(discountUserRel.getHighDiscount().getDiscountPrice());
// 如果总额小于0 // 如果总额小于0
if (payablePrice.compareTo(new BigDecimal("0")) == -1) { if (payablePrice.compareTo(new BigDecimal("0")) == -1) {
@ -279,11 +273,18 @@ public class OrderServiceImpl implements OrderService {
BigDecimal discountPrice = discountUserRel.getHighDiscount().getDiscountPrice(); BigDecimal discountPrice = discountUserRel.getHighDiscount().getDiscountPrice();
// 订单总额 * 折扣 // 订单总额 * 折扣
BigDecimal payablePrice = order.getTotalPrice().multiply(discountPrice).setScale(2, BigDecimal.ROUND_HALF_DOWN); BigDecimal payablePrice = order.getTotalPrice().multiply(discountPrice).setScale(2, BigDecimal.ROUND_HALF_DOWN);
order.setDeductionPrice(order.getTotalPrice().subtract(payablePrice)); order.setDeductionCouponPrice(order.getTotalPrice().subtract(payablePrice));
order.setPayablePrice(payablePrice); order.setPayablePrice(payablePrice);
} }
} }
// 计算订单金额
Map<String, Object> calculateOrderPrice = OrderUtil.calculateOrderPrice(order.getHighChildOrderList());
order.setTotalPrice(new BigDecimal(calculateOrderPrice.get("totalPrice").toString()));
order.setTotalDeductionPrice(new BigDecimal(calculateOrderPrice.get("deductionPrice").toString()).add(order.getDeductionCouponPrice()));
order.setPayablePrice(order.getTotalPrice().subtract(order.getTotalDeductionPrice()));
order.setPayPrice(order.getPayablePrice());
// 积分抵扣 // 积分抵扣
if (createOrderModel.getPayGold() != null && createOrderModel.getPayGold().compareTo(0) == 1) { if (createOrderModel.getPayGold() != null && createOrderModel.getPayGold().compareTo(0) == 1) {
// 查询用户 // 查询用户
@ -599,7 +600,7 @@ public class OrderServiceImpl implements OrderService {
criteria.andOrderStatusEqualTo(MapUtils.getInteger(param, "status")); criteria.andOrderStatusEqualTo(MapUtils.getInteger(param, "status"));
} }
example.setOrderByClause("createTime desc"); example.setOrderByClause("create_time desc");
return orderMapper.selectByExample(example); return orderMapper.selectByExample(example);
} }
} }

@ -1,5 +1,8 @@
package com.hai.order.utils; package com.hai.order.utils;
import com.hai.common.exception.ErrorCode;
import com.hai.common.exception.ErrorHelp;
import com.hai.common.exception.SysCode;
import com.hai.common.utils.DateUtil; import com.hai.common.utils.DateUtil;
import com.hai.common.utils.IDGenerator; import com.hai.common.utils.IDGenerator;
import com.hai.entity.HighChildOrder; import com.hai.entity.HighChildOrder;
@ -21,19 +24,25 @@ public class OrderUtil {
* @return * @return
* @throws Exception * @throws Exception
*/ */
public static Map<String, Object> calculateOrderPrice(List<HighChildOrder> childOrderList) throws Exception { public static Map<String, Object> calculateOrderPrice(List<HighChildOrder> childOrderList) {
BigDecimal totalPrice = new BigDecimal("0"); BigDecimal totalPrice = new BigDecimal("0");
BigDecimal payablePrice = new BigDecimal("0"); BigDecimal payablePrice = new BigDecimal("0");
BigDecimal deductionPrice = new BigDecimal("0");
for (HighChildOrder childOrder : childOrderList) { for (HighChildOrder childOrder : childOrderList) {
// 不是赠品才会计算金额 // 不是赠品才会计算金额
if (childOrder.getGiveawayType() == false) { if (childOrder.getGiveawayType() == false) {
if (childOrder.getTotalPrice() == null || childOrder.getGoodsActualPrice() == null || childOrder.getTotalDeductionPrice() == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "缺少计算金额");
}
totalPrice = totalPrice.add(childOrder.getTotalPrice()); totalPrice = totalPrice.add(childOrder.getTotalPrice());
payablePrice = payablePrice.add(childOrder.getGoodsActualPrice()); payablePrice = payablePrice.add(childOrder.getGoodsActualPrice());
deductionPrice = deductionPrice.add(childOrder.getTotalDeductionPrice());
} }
} }
Map<String,Object> param = new HashMap<>(); Map<String,Object> param = new HashMap<>();
param.put("totalPrice", totalPrice); param.put("totalPrice", totalPrice);
param.put("payablePrice", payablePrice); param.put("payablePrice", payablePrice);
param.put("deductionPrice", deductionPrice);
return param; return param;
} }

@ -236,7 +236,7 @@ public interface HighOrderService {
* @Description 根据用户查询订单统计 * @Description 根据用户查询订单统计
* @Date 2021/3/27 15:50 * @Date 2021/3/27 15:50
**/ **/
Integer countOrderByUserId(Long memId , Integer status); Long countOrderByUserId(Long memId , Integer status);
/** /**
* @Author 袁野 * @Author 袁野

@ -2,6 +2,8 @@ package com.hai.service;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.hai.entity.HighUser; import com.hai.entity.HighUser;
import com.hai.enum_type.LoginPlatform;
import com.hai.model.HighUserModel;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import java.util.List; import java.util.List;
@ -16,6 +18,15 @@ import java.util.Map;
*/ */
public interface HighUserService { public interface HighUserService {
/**
* 登录并注册
* @param platForm 平台
* @param phone 手机号
* @param popularizeUserId 手机号
* @return
* @throws Exception
*/
HighUserModel loginAndRegister(LoginPlatform platForm, String phone, Long popularizeUserId, Map<String, Object> other) throws Exception;
/** /**
* *

@ -2089,14 +2089,14 @@ public class HighOrderServiceImpl implements HighOrderService {
} }
@Override @Override
public Integer countOrderByUserId(Long memId, Integer status) { public Long countOrderByUserId(Long memId, Integer status) {
HighOrderExample example = new HighOrderExample(); HighOrderExample example = new HighOrderExample();
HighOrderExample.Criteria criteria = example.createCriteria(); HighOrderExample.Criteria criteria = example.createCriteria();
criteria.andMemIdEqualTo(memId); criteria.andMemIdEqualTo(memId);
criteria.andOrderStatusEqualTo(status); criteria.andOrderStatusEqualTo(status);
return highOrderMapper.selectByExample(example).size(); return highOrderMapper.countByExample(example);
} }
@Override @Override
@ -2795,7 +2795,7 @@ public class HighOrderServiceImpl implements HighOrderService {
} }
} }
highOrder.setDeductionPrice(discountPrice); highOrder.setTotalDeductionPrice(discountPrice);
highOrder.setPayGold(object.getInteger("integralNum")); highOrder.setPayGold(object.getInteger("integralNum"));
highOrder.setTotalPrice(orderPayPrice); highOrder.setTotalPrice(orderPayPrice);

@ -63,7 +63,7 @@ public class HighQzOrderServiceImpl implements HighQzOrderService {
highOrder.setPayType(2); highOrder.setPayType(2);
highOrder.setPayPrice(data.getBigDecimal("totalPrice")); highOrder.setPayPrice(data.getBigDecimal("totalPrice"));
highOrder.setTotalPrice(data.getBigDecimal("totalPrice")); highOrder.setTotalPrice(data.getBigDecimal("totalPrice"));
highOrder.setDeductionPrice(new BigDecimal("0")); highOrder.setTotalDeductionPrice(new BigDecimal("0"));
highOrder.setOrderStatus(1); highOrder.setOrderStatus(1);
highOrder.setCreateTime(data.getDate("createTime")); highOrder.setCreateTime(data.getDate("createTime"));

@ -4,16 +4,23 @@ import com.alibaba.fastjson.JSONObject;
import com.hai.common.exception.ErrorCode; import com.hai.common.exception.ErrorCode;
import com.hai.common.exception.ErrorHelp; import com.hai.common.exception.ErrorHelp;
import com.hai.common.exception.SysCode; import com.hai.common.exception.SysCode;
import com.hai.common.security.AESEncodeUtil;
import com.hai.common.security.SessionObject; import com.hai.common.security.SessionObject;
import com.hai.common.security.UserCenter; import com.hai.common.security.UserCenter;
import com.hai.common.utils.BaiduUtils;
import com.hai.common.utils.DateUtil; import com.hai.common.utils.DateUtil;
import com.hai.common.utils.HttpsUtils;
import com.hai.common.utils.RequestUtils;
import com.hai.dao.HighGoldRecMapper; import com.hai.dao.HighGoldRecMapper;
import com.hai.dao.HighUserLoginLogMapper;
import com.hai.dao.HighUserMapper; import com.hai.dao.HighUserMapper;
import com.hai.entity.*; import com.hai.entity.*;
import com.hai.enum_type.LoginPlatform;
import com.hai.enum_type.OilCardBindStatusEnum; import com.hai.enum_type.OilCardBindStatusEnum;
import com.hai.enum_type.UserCardType; import com.hai.enum_type.UserCardType;
import com.hai.model.HighUserModel; import com.hai.model.HighUserModel;
import com.hai.service.*; import com.hai.service.*;
import org.apache.commons.collections4.MapUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Propagation;
@ -65,6 +72,72 @@ public class HighUserServiceImpl implements HighUserService {
@Resource @Resource
private BsDistributionUserRelService distributionUserRelService; private BsDistributionUserRelService distributionUserRelService;
@Resource
private CommonService commonService;
@Resource
private HighUserLoginLogMapper userLoginLogMapper;
@Override
@Transactional(propagation = Propagation.REQUIRES_NEW, timeout = 30, rollbackFor = Exception.class)
public HighUserModel loginAndRegister(LoginPlatform platform,String phone, Long popularizeUserId, Map<String, Object> other) throws Exception {
// 记录登录信息
String requestIp = RequestUtils.getRequestIp();
HighUserLoginLog loginLog = new HighUserLoginLog();
loginLog.setUserPhone(phone);
loginLog.setPlatform(platform.getName());
loginLog.setIp(requestIp);
loginLog.setProvinceName("未知");
loginLog.setCityName("未知");
loginLog.setStatus(1);
loginLog.setCreateTime(new Date());
JSONObject ipResponse = BaiduUtils.ipLocation(requestIp);
if (ipResponse != null && ipResponse.getInteger("status").equals(0)) {
JSONObject ipAddressDetail = ipResponse.getJSONObject("content").getJSONObject("address_detail");
loginLog.setProvinceName(StringUtils.isBlank(ipAddressDetail.getString("province"))?"未知":ipAddressDetail.getString("province"));
loginLog.setCityName(StringUtils.isBlank(ipAddressDetail.getString("city"))?"未知":ipAddressDetail.getString("city"));
}
HighUser user = findByPhone(phone);
if (user == null) {
user = new HighUser();
user.setName("嗨用户");
user.setPhone(phone);
user.setRegTime(new Date());
user.setGold(0);
user.setStatus(1);
user.setInfoCompleteStatus(1); // 用户信息完整状态 0:完整 1:需要填写用户信息 2:需要填写手机号
user.setOpenId(MapUtils.getString(other, "openId"));
user.setUnionId(MapUtils.getString(other, "unionId"));
user.setUnionUnionId(MapUtils.getString(other, "unionUnionId"));
highUserMapper.insert(user);
// 检查是否有的预留油卡
HighOilCard oilCard = oilCardService.getOilCardByPhone(user.getPhone());
if (oilCard != null && oilCard.getBindStatus().equals(OilCardBindStatusEnum.status0.getStatus())) {
highUserCardService.bindCard(UserCardType.type2.getType(), oilCard.getCardNo(), user.getId());
}
SecRegion region = commonService.getRegionsByName(loginLog.getProvinceName());
if (region != null) {
// 绑定推广关联关系
distributionUserRelService.insertDistributionRebate(user.getId(), popularizeUserId, region.getRegionId().toString());
}
}
loginLog.setUserId(user.getId());
userLoginLogMapper.insert(loginLog);
// 缓存登录信息
HighUserModel highUserModel = new HighUserModel();
highUserModel.setHighUser(getDetailDataByUser(user.getId()));
SessionObject so = new SessionObject(AESEncodeUtil.base64Encode(AESEncodeUtil.aesEncryptToBytes(user.getPhone(), "123")), 1 , highUserModel);
so.setType(1);
userCenter.save(null,null,so);
return highUserModel;
}
@Override @Override
public List<HighUser> getListUser(Map<String, String> map) { public List<HighUser> getListUser(Map<String, String> map) {
HighUserExample example = new HighUserExample(); HighUserExample example = new HighUserExample();

@ -0,0 +1,61 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>com.hai</groupId>
<artifactId>hai-parent</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>com.hsg</groupId>
<artifactId>hai-user</artifactId>
<dependencies>
<dependency>
<groupId>com.hai</groupId>
<artifactId>hai-service</artifactId>
<version>PACKT-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.alibaba.csp</groupId>
<artifactId>sentinel-core</artifactId>
<version>1.8.2</version>
</dependency>
<dependency>
<groupId>com.alibaba.csp</groupId>
<artifactId>sentinel-transport-simple-http</artifactId>
<version>1.8.2</version>
</dependency>
<dependency>
<groupId>com.alibaba.csp</groupId>
<artifactId>sentinel-web-servlet</artifactId>
<version>1.8.2</version>
</dependency>
</dependencies>
<build>
<resources>
<resource>
<directory>src/main/resources/${env}</directory>
<filtering>false</filtering>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>

@ -0,0 +1,30 @@
package com;
import com.alicp.jetcache.anno.config.EnableCreateCacheAnnotation;
import com.alicp.jetcache.anno.config.EnableMethodCache;
import com.hai.common.utils.SpringContextUtil;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.context.ApplicationContext;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement;
@SpringBootApplication
//@ComponentScan
@EnableTransactionManagement
@EnableScheduling
@EnableMethodCache(basePackages = "com.hai")
@EnableCreateCacheAnnotation
@ServletComponentScan
@MapperScan("com.hai.dao")
public class UserApplication
{
public static void main( String[] args )
{
ApplicationContext app = SpringApplication.run(UserApplication.class, args);
SpringContextUtil.setApplicationContext(app);
}
}

@ -0,0 +1,85 @@
package com.web.config;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.module.SimpleModule;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.hai.common.security.UserCenter;
import com.hai.common.utils.RequestUtils;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
import org.springframework.web.multipart.support.StandardMultipartHttpServletRequest;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
@Configuration
public class AuthConfig implements WebMvcConfigurer {
private static Logger log = LoggerFactory.getLogger(AuthConfig.class);
@Resource
private UserCenter userCenter;
/**
* 获取配置文件debug变量
*/
@Value("${debug}")
private boolean debug = false;
/**
* 解决18位long类型数据转json失去精度问题
* @param converters
*/
@Override
public void configureMessageConverters(List<HttpMessageConverter<?>> converters){
MappingJackson2HttpMessageConverter jsonConverter = new MappingJackson2HttpMessageConverter();
ObjectMapper objectMapper = jsonConverter.getObjectMapper();
SimpleModule simpleModule = new SimpleModule();
simpleModule.addSerializer(Long.class, ToStringSerializer.instance);
simpleModule.addSerializer(Long.TYPE, ToStringSerializer.instance);
objectMapper.registerModule(simpleModule);
converters.add(jsonConverter);
}
public void addInterceptors(InterceptorRegistry registry) {
registry.addInterceptor(new HandlerInterceptorAdapter() {
@Override
public boolean preHandle(HttpServletRequest request, HttpServletResponse response,
Object handler) throws Exception {
if(debug){
return true;
}
String token = request.getHeader("Authorization");
if (StringUtils.isNotBlank(token)) {
if(userCenter.isLogin(request) == true) {
return true;
}
}
log.error("the user is not logged in,remoteAddr:"+ RequestUtils.getIpAddress(request)+",requestUrl:"+request.getRequestURL());
response.setStatus(401);
return false;
}
})
.addPathPatterns("/**")
.excludePathPatterns("/swagger-resources/**")
.excludePathPatterns("/**/api-docs")
.excludePathPatterns("/**/springfox-swagger-ui/**")
.excludePathPatterns("/**/swagger-ui.html")
.excludePathPatterns("/login/*")
.excludePathPatterns("/sms/*")
;
}
}

@ -0,0 +1,23 @@
package com.web.config;
import javax.annotation.Resource;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import javax.servlet.annotation.WebListener;
@WebListener
public class ConfigListener implements ServletContextListener {
@Resource
private SysConfig sysConfig;
@Override
public void contextInitialized(ServletContextEvent sce) {
SysConst.setSysConfig(sysConfig);
}
@Override
public void contextDestroyed(ServletContextEvent sce) {
}
}

@ -0,0 +1,49 @@
package com.web.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.cors.CorsConfiguration;
import org.springframework.web.cors.UrlBasedCorsConfigurationSource;
import org.springframework.web.filter.CorsFilter;
import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
import java.util.ArrayList;
import java.util.List;
/**
* @ClassName CorsConfig
* @Description: TODO ()
* @Author 胡锐
* @Date 2020/12/16
**/
@Configuration
public class CorsConfig extends WebMvcConfigurerAdapter {
@Override
public void addCorsMappings(CorsRegistry registry) {
registry.addMapping("/**")
.allowedOrigins("*")
.allowCredentials(true)
.allowedMethods("GET", "POST", "DELETE", "PUT")
.maxAge(3600);
}
private CorsConfiguration buildConfig() {
CorsConfiguration corsConfiguration = new CorsConfiguration();
List<String> list = new ArrayList<>();
list.add("*");
corsConfiguration.setAllowedOrigins(list);
/*
// 请求常用的三种配置,*代表允许所有,当时你也可以自定义属性(比如header只能带什么,只能是post方式等等)
*/
corsConfiguration.addAllowedOrigin("*");
corsConfiguration.addAllowedHeader("*");
corsConfiguration.addAllowedMethod("*");
return corsConfiguration;
}
@Bean
public CorsFilter corsFilter() {
UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
source.registerCorsConfiguration("/**", buildConfig());
return new CorsFilter(source);
}
}

@ -0,0 +1,26 @@
package com.web.config;
import org.springframework.boot.web.servlet.MultipartConfigFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import javax.servlet.MultipartConfigElement;
@Configuration
public class MultipartConfig {
/**
* 文件上传配置
* @return
*/
@Bean
public MultipartConfigElement multipartConfigElement() {
MultipartConfigFactory factory = new MultipartConfigFactory();
//文件最大
factory.setMaxFileSize("300MB"); //KB,MB
//设置总上传数据总大小
factory.setMaxRequestSize("350MB");
return factory.createMultipartConfig();
}
}

@ -0,0 +1,110 @@
package com.web.config;
import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.PropertyAccessor;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.springframework.cache.annotation.CachingConfigurerSupport;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.connection.RedisConnectionFactory;
import org.springframework.data.redis.core.*;
import org.springframework.data.redis.serializer.Jackson2JsonRedisSerializer;
import org.springframework.data.redis.serializer.StringRedisSerializer;
@Configuration
@EnableCaching //开启注解
public class RedisConfig extends CachingConfigurerSupport {
/**
* retemplate相关配置
* @param factory
* @return
*/
@Bean
public RedisTemplate<String, Object> redisTemplate(RedisConnectionFactory factory) {
RedisTemplate<String, Object> template = new RedisTemplate<>();
// 配置连接工厂
template.setConnectionFactory(factory);
//使用Jackson2JsonRedisSerializer来序列化和反序列化redis的value值(默认使用JDK的序列化方式)
Jackson2JsonRedisSerializer jacksonSeial = new Jackson2JsonRedisSerializer(Object.class);
ObjectMapper om = new ObjectMapper();
// 指定要序列化的域,field,get和set,以及修饰符范围,ANY是都有包括private和public
om.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY);
// 指定序列化输入的类型,类必须是非final修饰的,final修饰的类,比如String,Integer等会跑出异常
om.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL);
jacksonSeial.setObjectMapper(om);
// 值采用json序列化
template.setValueSerializer(jacksonSeial);
//使用StringRedisSerializer来序列化和反序列化redis的key值
template.setKeySerializer(new StringRedisSerializer());
// 设置hash key 和value序列化模式
template.setHashKeySerializer(new StringRedisSerializer());
template.setHashValueSerializer(jacksonSeial);
template.afterPropertiesSet();
return template;
}
/**
* 对hash类型的数据操作
*
* @param redisTemplate
* @return
*/
@Bean
public HashOperations<String, String, Object> hashOperations(RedisTemplate<String, Object> redisTemplate) {
return redisTemplate.opsForHash();
}
/**
* 对redis字符串类型数据操作
*
* @param redisTemplate
* @return
*/
@Bean
public ValueOperations<String, Object> valueOperations(RedisTemplate<String, Object> redisTemplate) {
return redisTemplate.opsForValue();
}
/**
* 对链表类型的数据操作
*
* @param redisTemplate
* @return
*/
@Bean
public ListOperations<String, Object> listOperations(RedisTemplate<String, Object> redisTemplate) {
return redisTemplate.opsForList();
}
/**
* 对无序集合类型的数据操作
*
* @param redisTemplate
* @return
*/
@Bean
public SetOperations<String, Object> setOperations(RedisTemplate<String, Object> redisTemplate) {
return redisTemplate.opsForSet();
}
/**
* 对有序集合类型的数据操作
*
* @param redisTemplate
* @return
*/
@Bean
public ZSetOperations<String, Object> zSetOperations(RedisTemplate<String, Object> redisTemplate) {
return redisTemplate.opsForZSet();
}
}

@ -0,0 +1,23 @@
package com.web.config;
import com.alibaba.csp.sentinel.adapter.servlet.CommonFilter;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import javax.servlet.Filter;
@Configuration
public class SentinelFilterConfig {
@Bean
public FilterRegistrationBean sentinelFilterRegistration() {
FilterRegistrationBean<Filter> registration = new FilterRegistrationBean<>();
registration.setFilter(new CommonFilter());
registration.addUrlPatterns("/*");
registration.setName("sentinelFilter");
registration.setOrder(1);
return registration;
}
}

@ -0,0 +1,47 @@
package com.web.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import springfox.documentation.builders.ApiInfoBuilder;
import springfox.documentation.builders.RequestHandlerSelectors;
import springfox.documentation.service.ApiInfo;
import springfox.documentation.service.Contact;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.swagger2.annotations.EnableSwagger2;
/**
* SwaggerConfig.java
* 项目名称:
* :
* 类名称: SwaggerConfig.java
* 类描述: 构建restful api接口文档
* 创建人:
* 创建时间: 2017 下午4:23:45
*/
@Configuration
@EnableSwagger2
public class SwaggerConfig
{
/**
* 描述api的基本信息
* 基本信息会展现在文档页面中
* @return [api的基本信息]
*/
ApiInfo apiInfo()
{
return new ApiInfoBuilder().title("hsg-order").description("订单业务接口").termsOfServiceUrl("").version("1.0.0")
.contact(new Contact("", "", "")).build();
}
@Bean
public Docket customImplementation()
{
return new Docket(DocumentationType.SWAGGER_2).select()
.apis(RequestHandlerSelectors.basePackage("com"))
.build().directModelSubstitute(org.joda.time.LocalDate.class, java.sql.Date.class)
.directModelSubstitute(org.joda.time.DateTime.class, java.util.Date.class).apiInfo(apiInfo());
}
}

@ -0,0 +1,21 @@
package com.web.config;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;
@Component("sysConfig")
@ConfigurationProperties
@PropertySource("classpath:/config.properties")
@Data
public class SysConfig {
private String fileUrl;
// 微信小程序Appid
private String wxMiniAppId;
// 微信小程序appSecret
private String wxMiniAppSecret;
}

@ -0,0 +1,19 @@
package com.web.config;
public class SysConst {
private static SysConfig sysConfig;
public static void setSysConfig(SysConfig arg){
sysConfig = arg;
}
public static SysConfig getSysConfig(){
if (null == sysConfig) {
//防止空指针异常
sysConfig = new SysConfig();
return sysConfig;
}
return sysConfig;
}
}

@ -0,0 +1,31 @@
package com.web.config;
import cn.binarywang.wx.miniapp.api.WxMaService;
import cn.binarywang.wx.miniapp.api.impl.WxMaServiceImpl;
import cn.binarywang.wx.miniapp.config.impl.WxMaDefaultConfigImpl;
import org.springframework.context.annotation.Configuration;
import javax.annotation.PostConstruct;
@Configuration
public class WxMaConfiguration {
private static WxMaService maService;
public static WxMaService getMaService() {
if (maService == null) {
throw new IllegalArgumentException(String.format("未找到对应的配置,请核实!"));
}
return maService;
}
@PostConstruct
public void init() {
WxMaDefaultConfigImpl config = new WxMaDefaultConfigImpl();
config.setAppid(SysConst.getSysConfig().getWxMiniAppId());
config.setSecret(SysConst.getSysConfig().getWxMiniAppSecret());
maService = new WxMaServiceImpl();
maService.setWxMaConfig(config);
}
}

@ -0,0 +1,75 @@
package com.web.controller;
import com.alibaba.fastjson.JSONObject;
import com.hai.common.exception.ErrorCode;
import com.hai.common.exception.ErrorHelp;
import com.hai.common.exception.SysCode;
import com.hai.common.security.UserCenter;
import com.hai.common.utils.MemberValidateUtil;
import com.hai.common.utils.RedisUtil;
import com.hai.common.utils.ResponseMsgUtil;
import com.hai.enum_type.LoginPlatform;
import com.hai.enum_type.RedisFileFolder;
import com.hai.model.HighUserModel;
import com.hai.model.ResponseData;
import com.hai.model.UserInfoModel;
import com.hai.service.HighUserService;
import com.web.type.LoginType;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.HashMap;
/**
* @className: CoresController
* @author: HuRui
* @date: 2022/10/21
**/
@Controller
@RequestMapping(value = "/cores")
@Api(value = "用户核心业务")
public class CoresController {
private static Logger log = LoggerFactory.getLogger(CoresController.class);
@Resource
private RedisUtil redisUtil;
@Resource
private HighUserService userService;
@Resource
private UserCenter userCenter;
@RequestMapping(value = "/outLogin", method = RequestMethod.POST)
@ResponseBody
@ApiOperation(value = "退出登录")
public ResponseData outLogin(HttpServletRequest request, HttpServletResponse response) {
try {
HighUserModel userInfoModel = userCenter.getSessionModel(HighUserModel.class);
if (userInfoModel == null) {
log.error("CoresController --> outLogin() error!", "用户身份错误或已过期");
throw ErrorHelp.genException(SysCode.System, ErrorCode.SEC_USER_EXPIRED, "");
}
userCenter.remove(request, response);
return ResponseMsgUtil.success("退出登录成功");
} catch (Exception e) {
log.error("CoresController --> outLogin() error!", e);
return ResponseMsgUtil.exception(e);
}
}
}

File diff suppressed because one or more lines are too long

@ -0,0 +1 @@
package com.web.controller; import com.alibaba.fastjson.JSONObject; import com.hai.common.exception.ErrorCode; import com.hai.common.exception.ErrorHelp; import com.hai.common.exception.SysCode; import com.hai.common.utils.MemberValidateUtil; import com.hai.common.utils.RedisUtil; import com.hai.common.utils.ResponseMsgUtil; import com.hai.config.MessageConfig; import com.hai.model.ResponseData; import com.hai.service.HighUserService; import com.hai.enum_type.RedisFileFolder; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.ResponseBody; import javax.annotation.Resource; import java.util.Random; /** * @Auther: 胡锐 * @Description: * @Date: 2021/3/26 23:08 */ @Controller @RequestMapping(value = "/sms") @Api(value = "短信服务") public class SmsController { private static Logger log = LoggerFactory.getLogger(SmsController.class); @Resource private RedisUtil redisUtil; @Resource private HighUserService userService; @RequestMapping(value = "/getLoginSMSCode", method = RequestMethod.POST) @ResponseBody @ApiOperation(value = "获取登录验证码") public ResponseData getLoginSMSCode(@RequestBody JSONObject body) { try { if (body == null || StringUtils.isBlank(body.getString("phone"))) { log.error("LoginController --> phone() error!", "请求参数校验失败"); throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); } String phone = body.getString("phone"); // 校验手机号格式 if (MemberValidateUtil.validatePhone(phone) == false) { log.error("LoginController --> phone() error!", "请输入正确的手机号"); throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "请输入正确的手机号"); } // 生成随机6位验证码 String smsCode = String.valueOf(new Random().nextInt(899999) + 100000); MessageConfig.req(phone,smsCode, MessageConfig.HWMSG_ID5); redisUtil.set(RedisFileFolder.SMS_CODE.getCode()+phone, smsCode, 60*5); return ResponseMsgUtil.success("短信发送成功"); } catch (Exception e) { log.error("SMSController --> getLoginSMSCode() error!", e); return ResponseMsgUtil.exception(e); } } }

@ -0,0 +1 @@
package com.web.controller; import com.hai.common.utils.DateUtil; import com.hai.common.utils.RedisUtil; import com.hai.common.utils.ResponseMsgUtil; import com.hai.entity.HighOrder; import com.hai.model.ResponseData; import com.hai.order.model.CreateOrderModel; import com.hai.order.service.OrderService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.apache.rocketmq.spring.core.RocketMQTemplate; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.redis.core.RedisTemplate; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.ResponseBody; import javax.annotation.Resource; import java.util.Date; /** * @Auther: 胡锐 * @Description: * @Date: 2021/3/26 23:08 */ @Controller @RequestMapping(value = "/test") @Api(value = "订单接口") public class TestController { private static Logger log = LoggerFactory.getLogger(TestController.class); @Autowired private RocketMQTemplate rocketMQTemplate; @Resource private OrderService orderService; @Resource private RedisUtil redisUtil; @Autowired private RedisTemplate redisTemplate; @RequestMapping(value = "/q", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "") public ResponseData q(@RequestParam(name = "orderNo", required = true) String orderNo) { try { HighOrder order = orderService.getOrderDetailByNo(orderNo); if (order != null) { orderService.refundOrder(orderNo, DateUtil.date2String(new Date(), "yyyy-MM-dd HH:mm:ss")); // order.setRefundTime(new Date()); // orderService.updateOrderData(order); return ResponseMsgUtil.success("修改成功"); } return ResponseMsgUtil.success(null); } catch (Exception e) { log.error("HighUserCardController --> rocketMq() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/rocketMq", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "") public ResponseData rocketMq(@RequestParam(name = "topicGroup", required = true) String topicGroup, @RequestParam(name = "body", required = true) String body) { try { long startTime = System.currentTimeMillis(); // org.springframework.messaging.Message message = MessageBuilder.withPayload(order).build(); CreateOrderModel createOrder = new CreateOrderModel(); //发送对象消息 HighOrder order = rocketMQTemplate.sendAndReceive("order-topic:create", createOrder, HighOrder.class); System.out.println("订单号:" + order.getOrderNo()); // SendResult sendResult = rocketMQTemplate.syncSend("order-topic:create", message, 3000); /*List<HighOrder> list = new LinkedList<>(); for (int i = 0; i <= 100;i++) { list.add(orderService.getDetailByOrderNo("HF2022080918014365701")); *//* list.add(orderService.getDetailByOrderNo("HF2022080918014365701"));*//* *//* updateUserWithRedisLock("coupon_" + couponKey, i+""); new Thread(() -> {*//* *//* redisTemplate.opsForValue().setIfAbsent("coupon_" + couponKey, i); System.out.println("加入数据" + i);*//* // redisTemplate.delete("coupon" + couponKey); // System.out.println("释放数据" + index); *//* });*//* }*/ System.out.println(System.currentTimeMillis() - startTime); return ResponseMsgUtil.success(null); } catch (Exception e) { log.error("HighUserCardController --> rocketMq() error!", e); return ResponseMsgUtil.exception(e); } } public void updateUserWithRedisLock(String couponKey, String value) throws InterruptedException { // 占分布式锁,去redis占坑 // 1. 分布式锁占坑 Boolean lock = redisTemplate.opsForValue().setIfAbsent("coupon" + couponKey, value); if(lock) { //加锁成功... // todo business System.out.println("加锁成功: " + value); redisTemplate.delete("coupon" + couponKey); //删除key,释放锁 } else { System.out.println("加锁失败"); /* Thread.sleep(100); // 加锁失败,重试 updateUserWithRedisLock("sysUser");*/ } } }

@ -0,0 +1,51 @@
package com.web.type;
import java.util.Objects;
/**
* 登录方式
* @className: LoginType
* @author: HuRui
* @date: 2022/10/20
**/
public enum LoginType {
SMS("SMS", "短信登录"),
;
private String code;
private String name;
LoginType(String code, String name) {
this.code = code;
this.name = name;
}
/**
* 根据类型查询数据
* @param code
* @return
*/
public static LoginType getDataByType(String code) {
for (LoginType ele : values()) {
if(Objects.equals(code,ele.getCode())) return ele;
}
return null;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}

@ -0,0 +1,102 @@
server:
port: 9305
servlet:
context-path: /user
#配置是否为debug模式,debug模式下,不开启权限校验
debug: false
#datasource数据源设置
spring:
datasource:
url: jdbc:mysql://139.159.177.244:3306/hsg_order?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false
username: root
password: HF123456.
type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.jdbc.Driver
filters: stat
maxActive: 10
initialSize: 5
maxWait: 60000
minIdle: 5
timeBetweenEvictionRunsMillis: 60000
minEvictableIdleTimeMillis: 300000
validationQuery: select 'x'
testWhileIdle: true
testOnBorrow: false
testOnReturn: false
poolPreparedStatements: true
maxOpenPreparedStatements: 20
redis:
database: 0
host: 139.159.177.244
port: 36379
password: HF123456.Redis
timeout: 1000
jedis:
pool:
max-active: 20
max-wait: -1
max-idle: 10
min-idle: 0
#MQTT配置信息
mqtt:
#MQTT服务地址
url: ws://139.159.177.244:8083/mqtt
#用户名
username: printer_provider
#密码
password: 123654
#客户端id(不能重复)
# client:
# id: provider-id
#MQTT默认的消息推送主题,实际可在调用接口是指定
# default:
# topic: topic
rocketmq:
name-server: 139.159.177.244:9876
producer:
#必须指定group
group: default-group
#配置日期返回至前台为时间戳
jackson:
serialization:
write-dates-as-timestamps: true
mybatis:
mapperLocations:
- classpath*:sqlmap*/*.xml
type-aliases-package:
org.springboot.sample.entity
configuration:
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
#开启MyBatis的二级缓存
cache-enabled: true
jetcache:
statIntervalMinutes: 15
areaInCacheName: false
local:
default:
type: linkedhashmap
keyConvertor: fastjson
remote:
default:
type: redis
host: 139.159.177.244
port: 36379
password: HF123456.Redis
keyConvertor: fastjson
broadcastChannel: projectA
valueEncoder: java
valueDecoder: java
poolConfig:
minIdle: 5
maxIdle: 20
maxTotal: 50
pagehelper:
helperDialect: mysql
reasonable: true
supportMethodsArguments: true
params: count=countSql

@ -0,0 +1,27 @@
# \u03A2\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD
wxAppId=wx8d49e2f83025229d
wxAppSecret=d8d6dcaef77d3b659258a01b5ddba5df
wxH5AppId=wxa075e8509802f826
wxH5AppSecret=0e606fc1378d35e359fcf3f15570b2c5
wxApiKey=Skufk5oi85wDFGl888i6wsRSTkdd5df5
wxMchAppId=wx637bd6f7314daa46
wxMchId=1289663601
wxSubAppId=wx8d49e2f83025229d
wxSubMchId=1609882817
wxUnifiedOrderUrl=https://api.mch.weixin.qq.com/pay/unifiedorder
wxGzSubAppId=wxa075e8509802f826
wxGzSubMchId=1619676214
# ????????????
HDAppId = 1614670195
notifyUrl=https://hsgcs.dctpay.com/crest/wechatpay/notify
imgUrl=https://hsgcs.dctpay.com/filesystem/
fileUrl=/home/project/hsg/filesystem
cmsPath=/home/project/hsg/filesystem/cmsPath
couponCodePath=/home/project/hsg/filesystem/couponCode
qrCodeUrl=https://hsgcs.dctpay.com/hsgH5?accountId=0000010&key=&code=

@ -0,0 +1,93 @@
<configuration>
<!-- %m输出的信息,%p日志级别,%t线程名,%d日期,%c类的全名,,,, -->
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d %p (%file:%line\)- %m%n</pattern>
<charset>UTF-8</charset>
</encoder>
</appender>
<appender name="baselog"
class="ch.qos.logback.core.rolling.RollingFileAppender">
<File>log/base.log</File>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>log/base.log.%d.%i</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<!-- or whenever the file size reaches 64 MB -->
<maxFileSize>64 MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder>
<pattern>
%d %p (%file:%line\)- %m%n
</pattern>
<charset>UTF-8</charset> <!-- 此处设置字符集 -->
</encoder>
</appender>
<appender name="daolog"
class="ch.qos.logback.core.rolling.RollingFileAppender">
<File>log/dao.log</File>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>log/dao.log.%d.%i</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<!-- or whenever the file size reaches 64 MB -->
<maxFileSize>64 MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder>
<pattern>
%d %p (%file:%line\)- %m%n
</pattern>
<charset>UTF-8</charset> <!-- 此处设置字符集 -->
</encoder>
</appender>
<appender name="errorlog"
class="ch.qos.logback.core.rolling.RollingFileAppender">
<File>log/error.log</File>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>log/error.log.%d.%i</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<!-- or whenever the file size reaches 64 MB -->
<maxFileSize>64 MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder>
<pattern>
%d %p (%file:%line\)- %m%n
</pattern>
<charset>UTF-8</charset> <!-- 此处设置字符集 -->
</encoder>
</appender>
<root level="DEBUG">
<appender-ref ref="STDOUT" />
</root>
<logger name="com.hai" level="INFO">
<appender-ref ref="baselog" />
</logger>
<logger name="com.hai.dao" level="DEBUG">
<appender-ref ref="daolog" />
</logger>
<logger name="com.hai" level="ERROR">
<appender-ref ref="errorlog" />
</logger>
<appender name="ChongQingCNPC" class="ch.qos.logback.core.rolling.RollingFileAppender">
<File>log/ChongQingCNPCService.log</File>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>log/ChongQingCNPCService.log.%d.%i</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<!-- or whenever the file size reaches 64 MB -->
<maxFileSize>64 MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder>
<pattern>
%d %p (%file:%line\)- %m%n
</pattern>
<charset>UTF-8</charset> <!-- 此处设置字符集 -->
</encoder>
</appender>
<logger name="com.hai.config.ChongQingCNPCService" level="INFO">
<appender-ref ref="ChongQingCNPC" />
</logger>
</configuration>

@ -68,6 +68,7 @@
<module>hai-order</module> <module>hai-order</module>
<module>hai-msg</module> <module>hai-msg</module>
<module>v1</module> <module>v1</module>
<module>hai-user</module>
</modules> </modules>

Loading…
Cancel
Save