From 58853e68a607eabb110141bd03cbffd2cf3786be Mon Sep 17 00:00:00 2001
From: Sum1Dream <418471657@qq.com>
Date: Thu, 9 Jun 2022 09:55:26 +0800
Subject: [PATCH 1/4] =?UTF-8?q?=E5=90=88=E5=B9=B6=E8=AF=9D=E8=B4=B9?=
=?UTF-8?q?=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../controller/HighOpenApiController.java | 44 +++++++++----------
1 file changed, 22 insertions(+), 22 deletions(-)
diff --git a/hai-bweb/src/main/java/com/bweb/controller/HighOpenApiController.java b/hai-bweb/src/main/java/com/bweb/controller/HighOpenApiController.java
index 6f884edc..3f9c50c1 100644
--- a/hai-bweb/src/main/java/com/bweb/controller/HighOpenApiController.java
+++ b/hai-bweb/src/main/java/com/bweb/controller/HighOpenApiController.java
@@ -95,18 +95,18 @@ public class HighOpenApiController {
public ResponseData getGuizhouSinopecList(HttpServletRequest request) {
try {
-// String ip = "";
-// // 有的user可能使用代理,为处理用户使用代理的情况,使用x-forwarded-for
-// if (request.getHeader("x-forwarded-for") == null) {
-// ip = request.getRemoteAddr();
-// } else {
-// ip = request.getHeader("x-forwarded-for");
-// }
-//
-// if (!secConfigService.isConfig("IP_WHITE" , ip)) {
-// log.error("getGuizhouSinopec error!", "非法ip地址,请联系管理人员!");
-// throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "非法ip地址,请联系管理人员!");
-// }
+ String ip = "";
+ // 有的user可能使用代理,为处理用户使用代理的情况,使用x-forwarded-for
+ if (request.getHeader("x-forwarded-for") == null) {
+ ip = request.getRemoteAddr();
+ } else {
+ ip = request.getHeader("x-forwarded-for");
+ }
+
+ if (!secConfigService.isConfig("IP_WHITE" , ip)) {
+ log.error("getGuizhouSinopec error!", "非法ip地址,请联系管理人员!");
+ throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "非法ip地址,请联系管理人员!");
+ }
// 获取token
String token = huiLianTongConfig.getToken();
@@ -140,16 +140,16 @@ public class HighOpenApiController {
ip = request.getHeader("x-forwarded-for");
}
-// if (!secConfigService.isConfig("IP_WHITE" , ip)) {
-// log.error("getGuizhouSinopec error!", "非法ip地址,请联系管理人员!");
-// throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "非法ip地址,请联系管理人员!");
-// }
+ if (!secConfigService.isConfig("IP_WHITE" , ip)) {
+ log.error("getGuizhouSinopec error!", "非法ip地址,请联系管理人员!");
+ throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "非法ip地址,请联系管理人员!");
+ }
// 获取token
String token = huiLianTongConfig.getToken();
// 查询电子卡券类型
- JSONObject data = HuiLianTongConfig.getCouState(token, object.getString("orderNo"));
+ JSONObject data = HuiLianTongConfig.getCouState(token, object.getString("couNo"));
if (!data.getString("result").equals("success")) {
log.error("HighOpenApiController -> insertCoupon() error!","查询电子券状态失败");
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "查询电子券状态失败");
@@ -175,11 +175,11 @@ public class HighOpenApiController {
} else {
ip = request.getHeader("x-forwarded-for");
}
-//
-// if (!secConfigService.isConfig("IP_WHITE" , ip)) {
-// log.error("couJointDist error!", "非法ip地址,请联系管理人员!");
-// throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "非法ip地址,请联系管理人员!");
-// }
+
+ if (!secConfigService.isConfig("IP_WHITE" , ip)) {
+ log.error("couJointDist error!", "非法ip地址,请联系管理人员!");
+ throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "非法ip地址,请联系管理人员!");
+ }
// 获取token
String token = huiLianTongConfig.getToken();
From bff8c0bc7a21a9448f842485397438b75e8f1a48 Mon Sep 17 00:00:00 2001
From: Sum1Dream <418471657@qq.com>
Date: Thu, 9 Jun 2022 14:39:26 +0800
Subject: [PATCH 2/4] =?UTF-8?q?=E5=90=88=E5=B9=B6=E8=AF=9D=E8=B4=B9?=
=?UTF-8?q?=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../controller/ApiMerchantsController.java | 16 ++++
.../bweb/controller/ApiProductController.java | 91 ++++++++++++++++++-
.../hai/dao/ApiProductConfigMapperExt.java | 42 ++++++++-
.../com/hai/model/ApiProductConfigModel.java | 60 ++++++++++++
.../com/hai/service/ApiMerchantsService.java | 15 +++
.../com/hai/service/ApiProductService.java | 21 +++++
.../service/impl/ApiMerchantsServiceImpl.java | 11 +++
.../service/impl/ApiProductServiceImpl.java | 13 +++
.../resources/dev/commonConfig.properties | 8 +-
9 files changed, 267 insertions(+), 10 deletions(-)
create mode 100644 hai-service/src/main/java/com/hai/model/ApiProductConfigModel.java
diff --git a/hai-bweb/src/main/java/com/bweb/controller/ApiMerchantsController.java b/hai-bweb/src/main/java/com/bweb/controller/ApiMerchantsController.java
index 5248a48f..096f3fe6 100644
--- a/hai-bweb/src/main/java/com/bweb/controller/ApiMerchantsController.java
+++ b/hai-bweb/src/main/java/com/bweb/controller/ApiMerchantsController.java
@@ -11,6 +11,7 @@ import com.hai.common.security.UserCenter;
import com.hai.common.utils.*;
import com.hai.entity.ApiMerchants;
import com.hai.entity.ApiProduct;
+import com.hai.entity.ApiProductConfig;
import com.hai.enum_type.ApiAmountRecordTypeEnum;
import com.hai.enum_type.CompanyAmountSourceTypeEnum;
import com.hai.model.HighMerchantModel;
@@ -278,4 +279,19 @@ public class ApiMerchantsController {
}
}
+ @RequestMapping(value = "/getListMerchProduct", method = RequestMethod.GET)
+ @ResponseBody
+ @ApiOperation(value = "查询商户产品")
+ public ResponseData getListMerchProduct(@RequestParam(value = "merchantId", required = true) Long merchantId) {
+ try {
+
+ return ResponseMsgUtil.success(apiMerchantsService.getListMerchProduct(merchantId));
+
+ } catch (Exception e) {
+ log.error("ApiMerchantsController --> findById() error!", e);
+ return ResponseMsgUtil.exception(e);
+ }
+ }
+
+
}
diff --git a/hai-bweb/src/main/java/com/bweb/controller/ApiProductController.java b/hai-bweb/src/main/java/com/bweb/controller/ApiProductController.java
index 7d1f5d3c..0f09bf86 100644
--- a/hai-bweb/src/main/java/com/bweb/controller/ApiProductController.java
+++ b/hai-bweb/src/main/java/com/bweb/controller/ApiProductController.java
@@ -10,10 +10,7 @@ import com.hai.common.security.SessionObject;
import com.hai.common.security.UserCenter;
import com.hai.common.utils.PageUtil;
import com.hai.common.utils.ResponseMsgUtil;
-import com.hai.entity.ApiProduct;
-import com.hai.entity.BsOperationLog;
-import com.hai.entity.HighAgent;
-import com.hai.entity.OutRechargePrice;
+import com.hai.entity.*;
import com.hai.model.OutRechargePriceModel;
import com.hai.model.ResponseData;
import com.hai.model.UserInfoModel;
@@ -236,7 +233,7 @@ public class ApiProductController {
if (object == null ||
object.getJSONArray("productIds") == null ||
- object.getInteger("discount") == null ||
+ object.getBigDecimal("discount") == null ||
object.getLong("merchantsId") == null
) {
log.error("ApiProductController -> configApiProduct() error!");
@@ -253,4 +250,88 @@ public class ApiProductController {
}
}
+
+ @RequestMapping(value = "/editConfigApiProductByStatus", method = RequestMethod.POST)
+ @ResponseBody
+ @ApiOperation(value = "修改商户产品状态")
+ public ResponseData editConfigApiProductByStatus(@RequestBody JSONObject object, HttpServletRequest request) {
+ try {
+
+ if (object == null ||
+ object.getInteger("status") == null ||
+ object.getInteger("id") == null
+ ) {
+ log.error("ApiProductController -> configApiProduct() error!");
+ throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, "");
+ }
+
+ SessionObject sessionObject = userCenter.getSessionObject(request);
+ UserInfoModel userInfoModel = (UserInfoModel) sessionObject.getObject();
+
+ ApiProductConfig apiProductConfig = apiProductService.findProductConfigById(object.getLong("id"));
+
+ apiProductConfig.setStatus(object.getInteger("status"));
+ apiProductConfig.setOperatorName(userInfoModel.getSecUser().getUserName());
+ apiProductConfig.setOperatorId(userInfoModel.getSecUser().getId());
+ apiProductService.updateConfigApiProduct(apiProductConfig);
+
+ return ResponseMsgUtil.success("修改成功");
+
+ } catch (Exception e) {
+ log.error("ApiProductController --> editPriceStatus() error!", e);
+ return ResponseMsgUtil.exception(e);
+ }
+ }
+
+
+ @RequestMapping(value = "/updateConfigApiProduct", method = RequestMethod.POST)
+ @ResponseBody
+ @ApiOperation(value = "修改配置产品")
+ public ResponseData updateConfigApiProduct(@RequestBody JSONObject object) {
+ try {
+
+ if (object == null ||
+ object.getBigDecimal("discount") == null ||
+ object.getLong("id") == null
+ ) {
+ log.error("ApiProductController -> configApiProduct() error!");
+ throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, "");
+ }
+
+ ApiProductConfig apiProductConfig = apiProductService.findProductConfigById(object.getLong("id"));
+
+ ApiProduct apiProduct = apiProductService.findById(apiProductConfig.getProductId());
+
+ if (apiProductConfig.getStatus() == 101) {
+ log.error("ApiProductController -> configApiProduct() error!");
+ throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "当前状态错误");
+ }
+
+ apiProductConfig.setDiscount(object.getBigDecimal("discount"));
+ apiProductConfig.setDiscountPrice(apiProduct.getRechargePrice().multiply(object.getBigDecimal("discount")).divide(new BigDecimal(100)));
+
+ apiProductService.updateConfigApiProduct(apiProductConfig);
+
+ return ResponseMsgUtil.success("修改成功");
+
+ } catch (Exception e) {
+ log.error("ApiProductController --> insertPrice() error!", e);
+ return ResponseMsgUtil.exception(e);
+ }
+ }
+
+ @RequestMapping(value = "/findConfigProduct", method = RequestMethod.GET)
+ @ResponseBody
+ @ApiOperation(value = "查询配置产品")
+ public ResponseData findConfigProduct(@RequestParam(value = "id", required = true) Long id) {
+ try {
+
+ return ResponseMsgUtil.success(apiProductService.findProductConfigById(id));
+
+ } catch (Exception e) {
+ log.error("ApiMerchantsController --> findById() error!", e);
+ return ResponseMsgUtil.exception(e);
+ }
+ }
+
}
diff --git a/hai-service/src/main/java/com/hai/dao/ApiProductConfigMapperExt.java b/hai-service/src/main/java/com/hai/dao/ApiProductConfigMapperExt.java
index c25eb4aa..ab7ee319 100644
--- a/hai-service/src/main/java/com/hai/dao/ApiProductConfigMapperExt.java
+++ b/hai-service/src/main/java/com/hai/dao/ApiProductConfigMapperExt.java
@@ -1,7 +1,47 @@
package com.hai.dao;
+import com.hai.model.ApiProductConfigModel;
+import com.hai.model.OutUserOrderModel;
+import org.apache.ibatis.annotations.Result;
+import org.apache.ibatis.annotations.Results;
+import org.apache.ibatis.annotations.Select;
+import org.apache.ibatis.type.JdbcType;
+
+import java.util.List;
+
/**
* mapper扩展类
*/
public interface ApiProductConfigMapperExt {
-}
\ No newline at end of file
+
+ @Select(value = {
+ ""
+ })
+ @Results({
+ @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
+ @Result(column="recharge_type", property="rechargeType", jdbcType=JdbcType.INTEGER),
+ @Result(column="recharge_platform", property="rechargePlatform", jdbcType=JdbcType.VARCHAR),
+ @Result(column="phone_recharge_type", property="phoneRechargeType", jdbcType=JdbcType.INTEGER),
+ @Result(column="operator_type", property="operatorType", jdbcType=JdbcType.INTEGER),
+ @Result(column="recharge_price", property="rechargePrice", jdbcType=JdbcType.DECIMAL),
+ @Result(column="product_id", property="productId", jdbcType=JdbcType.BIGINT),
+ @Result(column="api_config_product_id", property="apiConfigProductId", jdbcType=JdbcType.BIGINT),
+ @Result(column="sort", property="sort", jdbcType=JdbcType.INTEGER),
+ @Result(column="discount", property="discount", jdbcType=JdbcType.DECIMAL),
+ @Result(column="discount_price", property="discountPrice", jdbcType=JdbcType.DECIMAL),
+ @Result(column="operator_id", property="operatorId", jdbcType=JdbcType.BIGINT),
+ @Result(column="operator_name", property="operatorName", jdbcType=JdbcType.VARCHAR),
+ @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
+ @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
+ @Result(column="status", property="status", jdbcType=JdbcType.INTEGER),
+ @Result(column="config_status", property="configStatus", jdbcType=JdbcType.INTEGER),
+ @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 getListMerchProduct(Long merchantsId);
+
+}
diff --git a/hai-service/src/main/java/com/hai/model/ApiProductConfigModel.java b/hai-service/src/main/java/com/hai/model/ApiProductConfigModel.java
new file mode 100644
index 00000000..4d44ab30
--- /dev/null
+++ b/hai-service/src/main/java/com/hai/model/ApiProductConfigModel.java
@@ -0,0 +1,60 @@
+package com.hai.model;
+
+import com.hai.entity.ApiProduct;
+import com.hai.entity.ApiProductConfig;
+
+import java.math.BigDecimal;
+
+public class ApiProductConfigModel extends ApiProduct {
+ /**
+ * 折扣比例
+ */
+ private BigDecimal discount;
+
+ /**
+ * 折扣价格
+ */
+ private BigDecimal discountPrice;
+
+ /**
+ * 主键
+ */
+ private Long apiConfigProductId;
+
+ /**
+ * 101 正常 102 下架 100 删除
+ */
+ private Integer configStatus;
+
+ public Integer getConfigStatus() {
+ return configStatus;
+ }
+
+ public void setConfigStatus(Integer configStatus) {
+ this.configStatus = configStatus;
+ }
+
+ public Long getApiConfigProductId() {
+ return apiConfigProductId;
+ }
+
+ public void setApiConfigProductId(Long apiConfigProductId) {
+ this.apiConfigProductId = apiConfigProductId;
+ }
+
+ public BigDecimal getDiscount() {
+ return discount;
+ }
+
+ public void setDiscount(BigDecimal discount) {
+ this.discount = discount;
+ }
+
+ public BigDecimal getDiscountPrice() {
+ return discountPrice;
+ }
+
+ public void setDiscountPrice(BigDecimal discountPrice) {
+ this.discountPrice = discountPrice;
+ }
+}
diff --git a/hai-service/src/main/java/com/hai/service/ApiMerchantsService.java b/hai-service/src/main/java/com/hai/service/ApiMerchantsService.java
index 11db0ffc..167fbd74 100644
--- a/hai-service/src/main/java/com/hai/service/ApiMerchantsService.java
+++ b/hai-service/src/main/java/com/hai/service/ApiMerchantsService.java
@@ -3,6 +3,8 @@ package com.hai.service;
import com.alibaba.fastjson.JSONObject;
import com.hai.entity.ApiAmountRecord;
import com.hai.entity.ApiMerchants;
+import com.hai.entity.ApiProductConfig;
+import com.hai.model.ApiProductConfigModel;
import java.math.BigDecimal;
import java.util.List;
@@ -77,5 +79,18 @@ public interface ApiMerchantsService {
*/
List getMerchRechargeData(Long merchantId);
+ /**
+ * @Author Sum1Dream
+ * @name getListMerchProduct.java
+ * @Description // 查询商户配置产品
+ * @Date 10:10 2022/6/9
+ * @Param [java.lang.Long]
+ * @return java.util.List
+ */
+ List getListMerchProduct(Long merchantId);
+
+
+
+
}
diff --git a/hai-service/src/main/java/com/hai/service/ApiProductService.java b/hai-service/src/main/java/com/hai/service/ApiProductService.java
index 702073ce..f3cdc626 100644
--- a/hai-service/src/main/java/com/hai/service/ApiProductService.java
+++ b/hai-service/src/main/java/com/hai/service/ApiProductService.java
@@ -2,6 +2,7 @@ package com.hai.service;
import com.alibaba.fastjson.JSONObject;
import com.hai.entity.ApiProduct;
+import com.hai.entity.ApiProductConfig;
import io.swagger.annotations.Api;
import java.util.List;
@@ -65,4 +66,24 @@ public interface ApiProductService {
* @return void
*/
void configApiProduct(JSONObject object);
+
+ /**
+ * @Author Sum1Dream
+ * @name updateConfigApiProduct.java
+ * @Description // 修改配置产品
+ * @Date 11:17 2022/6/9
+ * @Param [com.alibaba.fastjson.JSONObject]
+ * @return void
+ */
+ void updateConfigApiProduct(ApiProductConfig apiProductConfig);
+
+ /**
+ * @Author Sum1Dream
+ * @name findProductConfigById.java
+ * @Description // 查询配置产品
+ * @Date 11:02 2022/6/9
+ * @Param [java.lang.Long]
+ * @return com.hai.entity.ApiProductConfig
+ */
+ ApiProductConfig findProductConfigById(Long id);
}
diff --git a/hai-service/src/main/java/com/hai/service/impl/ApiMerchantsServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/ApiMerchantsServiceImpl.java
index 9906d362..74eb336c 100644
--- a/hai-service/src/main/java/com/hai/service/impl/ApiMerchantsServiceImpl.java
+++ b/hai-service/src/main/java/com/hai/service/impl/ApiMerchantsServiceImpl.java
@@ -7,7 +7,9 @@ import com.hai.common.security.UserCenter;
import com.hai.common.utils.RedisUtil;
import com.hai.dao.ApiAmountRecordMapper;
import com.hai.dao.ApiMerchantsMapper;
+import com.hai.dao.ApiProductConfigMapper;
import com.hai.entity.*;
+import com.hai.model.ApiProductConfigModel;
import com.hai.model.UserInfoModel;
import com.hai.service.ApiMerchantsService;
import org.apache.commons.collections4.MapUtils;
@@ -37,6 +39,9 @@ public class ApiMerchantsServiceImpl implements ApiMerchantsService {
@Resource
private ApiAmountRecordMapper apiAmountRecordMapper;
+ @Resource
+ private ApiProductConfigMapper apiProductConfigMapper;
+
@Override
public void insertApiMerchants(ApiMerchants apiMerchants) {
apiMerchantsMapper.insert(apiMerchants);
@@ -134,4 +139,10 @@ public class ApiMerchantsServiceImpl implements ApiMerchantsService {
example.createCriteria().andMchIdEqualTo(apiMerchants.getMchId());
return apiAmountRecordMapper.selectByExample(example);
}
+
+ @Override
+ public List getListMerchProduct(Long merchantId) {
+ return apiProductConfigMapper.getListMerchProduct(merchantId);
+ }
+
}
diff --git a/hai-service/src/main/java/com/hai/service/impl/ApiProductServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/ApiProductServiceImpl.java
index b28ff8a8..1efd8890 100644
--- a/hai-service/src/main/java/com/hai/service/impl/ApiProductServiceImpl.java
+++ b/hai-service/src/main/java/com/hai/service/impl/ApiProductServiceImpl.java
@@ -112,7 +112,9 @@ public class ApiProductServiceImpl implements ApiProductService {
// 转换产品数组
JSONArray productsArray = object.getJSONArray("productIds");
ApiProductConfig apiProductConfig;
+ ApiProduct apiProduct;
for (Object productId : productsArray) {
+ apiProduct = apiProductMapper.selectByPrimaryKey(Long.valueOf(productId.toString()));
apiProductConfig = new ApiProductConfig();
apiProductConfig.setProductId(Long.valueOf(productId.toString()));
apiProductConfig.setCreateTime(new Date());
@@ -120,9 +122,20 @@ public class ApiProductServiceImpl implements ApiProductService {
apiProductConfig.setOperatorName(sessionModel.getSecUser().getUserName());
apiProductConfig.setStatus(101);
apiProductConfig.setDiscount(object.getBigDecimal("discount"));
+ apiProductConfig.setDiscountPrice(apiProduct.getRechargePrice().multiply(object.getBigDecimal("discount")).divide(new BigDecimal(100)));
apiProductConfig.setMerchantsId(object.getLong("merchantsId"));
apiProductConfig.setUpdateTime(new Date());
apiProductConfigMapper.insert(apiProductConfig);
}
}
+
+ @Override
+ public ApiProductConfig findProductConfigById(Long id) {
+ return apiProductConfigMapper.selectByPrimaryKey(id);
+ }
+
+ @Override
+ public void updateConfigApiProduct(ApiProductConfig apiProductConfig) {
+ apiProductConfigMapper.updateByPrimaryKey(apiProductConfig);
+ }
}
diff --git a/hai-service/src/main/resources/dev/commonConfig.properties b/hai-service/src/main/resources/dev/commonConfig.properties
index e1b6f8d6..01d060e7 100644
--- a/hai-service/src/main/resources/dev/commonConfig.properties
+++ b/hai-service/src/main/resources/dev/commonConfig.properties
@@ -14,10 +14,10 @@ qinzhuSecret=ktxb49sh2jfhgn8g
qianzhuOrderNotify=https://hsg.dctpay.com/crest/qianzhu/orderNotify
# ???????
-huiliantongUrl=https://gzapi.deepermobile.com.cn
-huiliantongAppNo=guizhouhuilt
-huiliantongAppkey=e0ja2Ex%2BmQ2hIPF6x%2BHA%3D
-huiliantongAppsecret=52662415DDCE55C7BA34223BCF53877A
+huiliantongUrl=https://gzapitest.deepermobile.com.cn:441
+huiliantongAppNo=guizhouhltcs
+huiliantongAppkey=g%2BNnjR54YSUWM2iKg%2Fd82A9x9hg2kYV7
+huiliantongAppsecret=FA28E95ACABFA4B2B8E25857437B07F1
# ????????
HuiLianTongUnionCardUrl=http://hltgz.com:4010/api/v2/execute.json
From 504f3b91fa2f4f9567fd2b0c2e8068228408a1e8 Mon Sep 17 00:00:00 2001
From: Sum1Dream <418471657@qq.com>
Date: Thu, 9 Jun 2022 14:56:21 +0800
Subject: [PATCH 3/4] =?UTF-8?q?=E5=90=88=E5=B9=B6=E8=AF=9D=E8=B4=B9?=
=?UTF-8?q?=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../OutRechargeOrderController.java | 5 +++-
.../resources/dev/commonConfig.properties | 4 +--
v1/target/classes/application.yml | 28 ++++---------------
3 files changed, 11 insertions(+), 26 deletions(-)
diff --git a/hai-cweb/src/main/java/com/cweb/controller/OutRechargeOrderController.java b/hai-cweb/src/main/java/com/cweb/controller/OutRechargeOrderController.java
index 1f708f70..6fbc5353 100644
--- a/hai-cweb/src/main/java/com/cweb/controller/OutRechargeOrderController.java
+++ b/hai-cweb/src/main/java/com/cweb/controller/OutRechargeOrderController.java
@@ -133,7 +133,10 @@ public class OutRechargeOrderController {
Map map = new HashMap<>();
map.put("userId", userInfoModel.getHighUser().getId().toString());
- map.put("payStatus", status.toString());
+ if (status != null) {
+ map.put("payStatus", status.toString());
+ }
+
map.put("orderNo", orderNo);
PageHelper.startPage(pageNum, pageSize);
diff --git a/hai-service/src/main/resources/dev/commonConfig.properties b/hai-service/src/main/resources/dev/commonConfig.properties
index 01d060e7..3daf7fd6 100644
--- a/hai-service/src/main/resources/dev/commonConfig.properties
+++ b/hai-service/src/main/resources/dev/commonConfig.properties
@@ -35,8 +35,8 @@ unionPayChannelid=D01X00000801226
unionPayMerid=83169055983W000
unionPayTermid=XS000103
unionPaySignKey=1dfk0i0fl7ild07l2k5oj8dddikkivd0
-unionPayNotifyUrl=https://hsg.dctpay.com/crest/unionPay/notify
-unionPayTelNotifyUrl=https://hsg.dctpay.com/crest/unionPay/notifyTel
+unionPayNotifyUrl=https://hsgcs.dctpay.com/crest/unionPay/notify
+unionPayTelNotifyUrl=https://hsgcs.dctpay.com/crest/unionPay/notifyTel
unionStagingPayUrl=https://mtest.eycard.cn/
unionStagingPayOrgId=ORG000000000001
diff --git a/v1/target/classes/application.yml b/v1/target/classes/application.yml
index 28b711c3..f0e71e2f 100644
--- a/v1/target/classes/application.yml
+++ b/v1/target/classes/application.yml
@@ -9,9 +9,9 @@ debug: false
#datasource数据源设置
spring:
datasource:
- url: jdbc:mysql://192.168.0.63:21100/hsg?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8
- username: hsg
- password: HUfukeji123456!@#
+ url: jdbc:mysql://139.159.177.244:3306/hfkj?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
@@ -29,38 +29,20 @@ spring:
maxOpenPreparedStatements: 20
redis:
database: 0
- host: 127.0.0.1
+ host: 139.159.177.244
port: 36379
password: HF123456.Redis
- timeout: 1000
+ timeout: 36000000
jedis:
pool:
max-active: 20
max-wait: -1
max-idle: 10
min-idle: 0
- #thymelea模板配置
- thymeleaf:
- prefix: classpath:/templates/
- suffix: .html
- mode: HTML5
- encoding: UTF-8
- #热部署文件,页面不产生缓存,及时更新
- cache: false
#配置日期返回至前台为时间戳
jackson:
serialization:
write-dates-as-timestamps: true
-
-
- thymeleaf:
- cache: false
- prefix: classpath:/templates/
- suffix: .html
- encoding: UTF-8
- content-type: text/html
- mode: HTML5
-
mybatis:
mapperLocations:
- classpath*:sqlmap*/*.xml
From f472dda5fddf106b03aa939d445f120573a307ed Mon Sep 17 00:00:00 2001
From: Sum1Dream <418471657@qq.com>
Date: Thu, 9 Jun 2022 16:04:54 +0800
Subject: [PATCH 4/4] =?UTF-8?q?=E5=90=88=E5=B9=B6=E8=AF=9D=E8=B4=B9?=
=?UTF-8?q?=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../OutRechargeOrderController.java | 20 +++++++++++--
.../hai/dao/OutRechargeOrderMapperExt.java | 2 +-
v1/target/classes/application.yml | 28 +++++++++++++++----
3 files changed, 42 insertions(+), 8 deletions(-)
diff --git a/hai-bweb/src/main/java/com/bweb/controller/OutRechargeOrderController.java b/hai-bweb/src/main/java/com/bweb/controller/OutRechargeOrderController.java
index 8f99b16a..3cb1fb81 100644
--- a/hai-bweb/src/main/java/com/bweb/controller/OutRechargeOrderController.java
+++ b/hai-bweb/src/main/java/com/bweb/controller/OutRechargeOrderController.java
@@ -51,6 +51,7 @@ import javax.servlet.http.HttpServletRequest;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.*;
+import java.util.function.IntFunction;
@Controller
@RequestMapping(value = "/outRechargeOrder")
@@ -134,6 +135,7 @@ public class OutRechargeOrderController {
@RequestParam(name = "payStatus", required = false) Integer payStatus,
@RequestParam(name = "rechargeStatus", required = false) String rechargeStatus,
@RequestParam(name = "orderNo", required = false) String orderNo,
+ @RequestParam(name = "companyId", required = false) Long companyId,
@RequestParam(name = "operatorType", required = false) String operatorType,
@RequestParam(name = "laborUnionCard", required = false) String laborUnionCard,
@RequestParam(name = "rechargeContent", required = false) String rechargeContent,
@@ -154,7 +156,16 @@ public class OutRechargeOrderController {
Map map = new HashMap<>();
- map.put("companyId", userInfoModel.getBsCompany().getId());
+ if (companyId != null) {
+ map.put("companyId", companyId);
+ } else if (userInfoModel.getSecRole().getRoleType() != 1){
+ if (userInfoModel.getSecRole().getRoleType() == 7) {
+ map.put("companyId", 23);
+ } else {
+ map.put("companyId", userInfoModel.getBsCompany().getId());
+ }
+ }
+
map.put("rechargeStatus", rechargeStatus);
map.put("payStatus", payStatus);
map.put("orderNo", orderNo);
@@ -189,6 +200,7 @@ public class OutRechargeOrderController {
public ResponseData exportOrderList(
@RequestParam(name = "payStatus", required = false) Integer payStatus,
@RequestParam(name = "rechargeStatus", required = false) String rechargeStatus,
+ @RequestParam(name = "companyId", required = false) Long companyId,
@RequestParam(name = "orderNo", required = false) String orderNo,
@RequestParam(name = "operatorType", required = false) String operatorType,
@RequestParam(name = "laborUnionCard", required = false) String laborUnionCard,
@@ -209,7 +221,11 @@ public class OutRechargeOrderController {
Map map = new HashMap<>();
- map.put("companyId", userInfoModel.getBsCompany().getId());
+ if (companyId != null) {
+ map.put("companyId", companyId);
+ } else if (userInfoModel.getSecRole().getRoleType() != 1){
+ map.put("companyId", userInfoModel.getBsCompany().getId());
+ }
map.put("rechargeStatus", rechargeStatus);
map.put("payStatus", payStatus);
map.put("orderNo", orderNo);
diff --git a/hai-service/src/main/java/com/hai/dao/OutRechargeOrderMapperExt.java b/hai-service/src/main/java/com/hai/dao/OutRechargeOrderMapperExt.java
index cbd3f4de..a2e5329b 100644
--- a/hai-service/src/main/java/com/hai/dao/OutRechargeOrderMapperExt.java
+++ b/hai-service/src/main/java/com/hai/dao/OutRechargeOrderMapperExt.java
@@ -134,7 +134,7 @@ public interface OutRechargeOrderMapperExt {
@Select(value = {
""
})
@Results({
diff --git a/v1/target/classes/application.yml b/v1/target/classes/application.yml
index f0e71e2f..28b711c3 100644
--- a/v1/target/classes/application.yml
+++ b/v1/target/classes/application.yml
@@ -9,9 +9,9 @@ debug: false
#datasource数据源设置
spring:
datasource:
- url: jdbc:mysql://139.159.177.244:3306/hfkj?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false
- username: root
- password: HF123456.
+ url: jdbc:mysql://192.168.0.63:21100/hsg?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8
+ username: hsg
+ password: HUfukeji123456!@#
type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.jdbc.Driver
filters: stat
@@ -29,20 +29,38 @@ spring:
maxOpenPreparedStatements: 20
redis:
database: 0
- host: 139.159.177.244
+ host: 127.0.0.1
port: 36379
password: HF123456.Redis
- timeout: 36000000
+ timeout: 1000
jedis:
pool:
max-active: 20
max-wait: -1
max-idle: 10
min-idle: 0
+ #thymelea模板配置
+ thymeleaf:
+ prefix: classpath:/templates/
+ suffix: .html
+ mode: HTML5
+ encoding: UTF-8
+ #热部署文件,页面不产生缓存,及时更新
+ cache: false
#配置日期返回至前台为时间戳
jackson:
serialization:
write-dates-as-timestamps: true
+
+
+ thymeleaf:
+ cache: false
+ prefix: classpath:/templates/
+ suffix: .html
+ encoding: UTF-8
+ content-type: text/html
+ mode: HTML5
+
mybatis:
mapperLocations:
- classpath*:sqlmap*/*.xml