1新增用户流水查询

2修改微信支付接口
This commit is contained in:
fengjundan 2021-07-28 17:36:39 +08:00
parent f740a822a4
commit c5d65672f9
33 changed files with 662 additions and 203 deletions

View File

@ -124,7 +124,7 @@ public class SysFileController
String[] idList = ids.split(","); String[] idList = ids.split(",");
for (String id : idList) { for (String id : idList) {
XhpcImg xhpcImg = iXhpcImgService.info(Long.parseLong(id)); XhpcImg xhpcImg = iXhpcImgService.info(Long.parseLong(id));
if (null != xhpcImg) { if (StringUtils.isNotNull(xhpcImg)) {
OSSClient ossClient = new OSSClient(environment.getProperty("oss.endpoint"), environment.getProperty("oss.access-key"), environment.getProperty("oss.secret-key")); OSSClient ossClient = new OSSClient(environment.getProperty("oss.endpoint"), environment.getProperty("oss.access-key"), environment.getProperty("oss.secret-key"));
ossClient.deleteObject(environment.getProperty("oss.bucket-name"), xhpcImg.getUrl()); ossClient.deleteObject(environment.getProperty("oss.bucket-name"), xhpcImg.getUrl());
ossClient.shutdown(); ossClient.shutdown();

View File

@ -41,7 +41,7 @@ public class XhpcHistoryOrderReconciliationStatusController extends BaseControll
* @return * @return
*/ */
@GetMapping("/internetUser") @GetMapping("/internetUser")
@ApiOperation(value = "修改对账状态") @ApiOperation(value = "流量用户信息")
public AjaxResult internetUser(@RequestParam Long userId) { public AjaxResult internetUser(@RequestParam Long userId) {
return iXhpcHistoryOrderReconciliationStatusService.internetUser(userId); return iXhpcHistoryOrderReconciliationStatusService.internetUser(userId);
} }

View File

@ -89,7 +89,7 @@ public class XhpcHistoryOrderReconciliationStatusServiceImpl implements IXhpcHis
@Override @Override
public AjaxResult internetUser(Long userId) { public AjaxResult internetUser(Long userId) {
Map<String, Object> map = redisService.getCacheMap(userId + ":privilege"); Map<String, Object> map = redisService.getCacheMap(userId + ":privilege");
if (null != map) { if (StringUtils.isNotNull(map)) {
String privilege = StringUtils.valueOf(map.get("privilege")); String privilege = StringUtils.valueOf(map.get("privilege"));
if ("1".equals(privilege)) { if ("1".equals(privilege)) {
String operatorId = StringUtils.valueOf(map.get("operatorId")); String operatorId = StringUtils.valueOf(map.get("operatorId"));
@ -116,7 +116,7 @@ public class XhpcHistoryOrderReconciliationStatusServiceImpl implements IXhpcHis
@Override @Override
public List<Map<String, Object>> page(Long userId, String serialNumber, String createTimeStart, String createTimeEnd, String chargingStationName, String status) { public List<Map<String, Object>> page(Long userId, String serialNumber, String createTimeStart, String createTimeEnd, String chargingStationName, String status) {
Map<String, Object> map = redisService.getCacheMap(userId + ":privilege"); Map<String, Object> map = redisService.getCacheMap(userId + ":privilege");
if (null != map) { if (StringUtils.isNotNull(map)) {
String privilege = StringUtils.valueOf(map.get("privilege")); String privilege = StringUtils.valueOf(map.get("privilege"));
if ("1".equals(privilege)) { if ("1".equals(privilege)) {
String operatorId = StringUtils.valueOf(map.get("operatorId")); String operatorId = StringUtils.valueOf(map.get("operatorId"));

View File

@ -89,7 +89,7 @@ public class XhpcHistoryOrderSortingStatusServiceImpl implements IXhpcHistoryOrd
@Override @Override
public AjaxResult operatorUser(Long userId) { public AjaxResult operatorUser(Long userId) {
Map<String, Object> map = redisService.getCacheMap(userId + ":privilege"); Map<String, Object> map = redisService.getCacheMap(userId + ":privilege");
if (null != map) { if (StringUtils.isNotNull(map)) {
String privilege = StringUtils.valueOf(map.get("privilege")); String privilege = StringUtils.valueOf(map.get("privilege"));
if ("1".equals(privilege)) { if ("1".equals(privilege)) {
String operatorId = StringUtils.valueOf(map.get("operatorId")); String operatorId = StringUtils.valueOf(map.get("operatorId"));
@ -117,7 +117,7 @@ public class XhpcHistoryOrderSortingStatusServiceImpl implements IXhpcHistoryOrd
@Override @Override
public List<Map<String, Object>> page(Long userId, String serialNumber, String createTimeStart, String createTimeEnd, String chargingStationName, String status) { public List<Map<String, Object>> page(Long userId, String serialNumber, String createTimeStart, String createTimeEnd, String chargingStationName, String status) {
Map<String, Object> map = redisService.getCacheMap(userId + ":privilege"); Map<String, Object> map = redisService.getCacheMap(userId + ":privilege");
if (null != map) { if (StringUtils.isNotNull(map)) {
String privilege = StringUtils.valueOf(map.get("privilege")); String privilege = StringUtils.valueOf(map.get("privilege"));
if ("1".equals(privilege)) { if ("1".equals(privilege)) {
String operatorId = StringUtils.valueOf(map.get("operatorId")); String operatorId = StringUtils.valueOf(map.get("operatorId"));

View File

@ -114,20 +114,20 @@
</if> </if>
GROUP BY xho.user_id) b on a.user_id = su.user_id GROUP BY xho.user_id) b on a.user_id = su.user_id
LEFT JOIN xhpc_internet_user xiu on xiu.internet_user_id = su.internet_user_id LEFT JOIN xhpc_internet_user xiu on xiu.internet_user_id = su.internet_user_id
where a.user_id = #{userId} where a.user_id = #{userId} limit 1
</select> </select>
<select id="page" parameterType="java.lang.Long" resultType="java.util.Map"> <select id="page" parameterType="java.lang.Long" resultType="java.util.Map">
select sum(xho.act_price-xho.internet_commission-xho.internet_svc_commission) select sum(xho.act_price-xho.internet_commission-xho.internet_svc_commission)
realIncome, realIncome,
xho.user_id userId,xho.serial_number serialNumber,xco.create_time createTime, xho.user_id userId,xho.serial_number serialNumber,xho.create_time createTime,
xo.`name` operatorName,xcs.`name` chargingStationName,xho.`reconciliation_status` xo.`name` operatorName,xcs.`name` chargingStationName,xho.`reconciliation_status`
reconciliationStatus,xdb.dict_value reconciliationStatusName reconciliationStatus,sdd.dict_label reconciliationStatusName
from xhpc_history_order xho from xhpc_history_order xho
LEFT JOIN xhpc_charge_order xco on xco.charge_order_id = xho.charging_order_id LEFT JOIN xhpc_charge_order xco on xco.charge_order_id = xho.charging_order_id
LEFT JOIN xhpc_charging_station xcs on xcs.charging_station_id = xho.charging_station_id LEFT JOIN xhpc_charging_station xcs on xcs.charging_station_id = xho.charging_station_id
LEFT JOIN xhpc_operator xo on xo.operator_id = xcs.operator_id LEFT JOIN xhpc_operator xo on xo.operator_id = xcs.operator_id
LEFT JOIN xhpc_dict_biz xdb on xdb.`code` = 'reconciliation_status' and xdb.dict_key = LEFT JOIN sys_dict_data sdd on sdd.`dict_type` = 'reconciliation_status' and sdd.dict_value =
xho.`reconciliation_status` xho.`reconciliation_status`
<if test="chargingStation != null and chargingStation !=''"> <if test="chargingStation != null and chargingStation !=''">
LEFT JOIN xhpc_user_privilege xup on xup.charging_station_id = xcs.charging_station_id LEFT JOIN xhpc_user_privilege xup on xup.charging_station_id = xcs.charging_station_id
@ -149,7 +149,7 @@
and xcs.`name`like concat(concat('%', #{chargingStationName}), '%') and xcs.`name`like concat(concat('%', #{chargingStationName}), '%')
</if> </if>
<if test="status != null and status != ''"> <if test="status != null and status != ''">
and xho.status = #{status} and xho.reconciliation_status = #{status}
</if> </if>
<if test="operatorId != null and operatorId !=''"> <if test="operatorId != null and operatorId !=''">
and xo.operator_id = #{operatorId } and xo.operator_id = #{operatorId }
@ -157,5 +157,6 @@
<if test="chargingStation != null and chargingStation !=''"> <if test="chargingStation != null and chargingStation !=''">
and xup.user_id = #{userId} and xup.user_id = #{userId}
</if> </if>
ORDER BY xho.create_time DESC
</select> </select>
</mapper> </mapper>

View File

@ -92,9 +92,8 @@
select xo.operator_id operatorId,xo.`name`,xo.open_bank openbank,xo.card_number select xo.operator_id operatorId,xo.`name`,xo.open_bank openbank,xo.card_number
cardNumber,a.waitSorting,b.sortingOnTheWay,c.withdrawnCash cardNumber,a.waitSorting,b.sortingOnTheWay,c.withdrawnCash
from sys_user su from sys_user su
LEFT JOIN (select sum(xho.act_power_price+xho.act_service_price) waitSorting,xho.user_id LEFT JOIN (select sum(xho.act_power_price+xho.act_service_price) waitSorting,xo.operator_id
from xhpc_history_order xho from xhpc_history_order xho
LEFT JOIN xhpc_charge_order xco on xco.charge_order_id = xho.charging_order_id
LEFT JOIN xhpc_charging_station xcs on xcs.charging_station_id = xho.charging_station_id LEFT JOIN xhpc_charging_station xcs on xcs.charging_station_id = xho.charging_station_id
LEFT JOIN xhpc_operator xo on xo.operator_id = xcs.operator_id LEFT JOIN xhpc_operator xo on xo.operator_id = xcs.operator_id
<if test="chargingStation != null and chargingStation != ''"> <if test="chargingStation != null and chargingStation != ''">
@ -107,11 +106,10 @@
<if test="chargingStation != null and chargingStation != ''"> <if test="chargingStation != null and chargingStation != ''">
and xho.user_id = #{userId} and xho.user_id = #{userId}
</if> </if>
GROUP BY xho.user_id) a on su.user_id = a.user_id GROUP BY xo.operator_id) a on su.operator_id = a.operator_id
LEFT JOIN LEFT JOIN
(select sum(xho.act_power_price+xho.act_service_price) sortingOnTheWay ,xho.user_id (select sum(xho.act_power_price+xho.act_service_price) sortingOnTheWay ,xo.operator_id
from xhpc_history_order xho from xhpc_history_order xho
LEFT JOIN xhpc_charge_order xco on xco.charge_order_id = xho.charging_order_id
LEFT JOIN xhpc_charging_station xcs on xcs.charging_station_id = xho.charging_station_id LEFT JOIN xhpc_charging_station xcs on xcs.charging_station_id = xho.charging_station_id
LEFT JOIN xhpc_operator xo on xo.operator_id = xcs.operator_id LEFT JOIN xhpc_operator xo on xo.operator_id = xcs.operator_id
<if test="chargingStation != null and chargingStation != ''"> <if test="chargingStation != null and chargingStation != ''">
@ -119,16 +117,15 @@
</if> </if>
where xho.del_flag = 0 and xho.sorting_status = 1 where xho.del_flag = 0 and xho.sorting_status = 1
<if test="operatorId != null and operatorId != ''"> <if test="operatorId != null and operatorId != ''">
and xo.operator_id = #{operatorId} and xo.operator_id = #{operatorId }
</if> </if>
<if test="chargingStation != null and chargingStation != ''"> <if test="chargingStation != null and chargingStation != ''">
and xcs.user_id = #{userId} and xho.user_id = #{userId}
</if> </if>
GROUP BY xho.user_id) b on su.user_id = b.user_id GROUP BY xo.operator_id) b on su.operator_id = b.operator_id
LEFT JOIN LEFT JOIN
(select sum(xho.act_power_price+xho.act_service_price) withdrawnCash ,xho.user_id (select sum(xho.act_power_price+xho.act_service_price) withdrawnCash ,xo.operator_id
from xhpc_history_order xho from xhpc_history_order xho
LEFT JOIN xhpc_charge_order xco on xco.charge_order_id = xho.charging_order_id
LEFT JOIN xhpc_charging_station xcs on xcs.charging_station_id = xho.charging_station_id LEFT JOIN xhpc_charging_station xcs on xcs.charging_station_id = xho.charging_station_id
LEFT JOIN xhpc_operator xo on xo.operator_id = xcs.operator_id LEFT JOIN xhpc_operator xo on xo.operator_id = xcs.operator_id
<if test="chargingStation != null and chargingStation != ''"> <if test="chargingStation != null and chargingStation != ''">
@ -136,37 +133,36 @@
</if> </if>
where xho.del_flag = 0 and xho.sorting_status = 2 where xho.del_flag = 0 and xho.sorting_status = 2
<if test="operatorId != null and operatorId != ''"> <if test="operatorId != null and operatorId != ''">
and xo.operator_id = #{operatorId} and xo.operator_id = #{operatorId }
</if> </if>
<if test="chargingStation != null and chargingStation != ''"> <if test="chargingStation != null and chargingStation != ''">
and xcs.user_id = #{userId} and xho.user_id = #{userId}
</if> </if>
GROUP BY xho.user_id) c on su.user_id = c.user_id GROUP BY xo.operator_id) c on su.operator_id = c.operator_id
LEFT JOIN xhpc_operator xo on xo.operator_id = su.operator_id LEFT JOIN xhpc_operator xo on xo.operator_id = su.operator_id
where a.user_id = #{userId} where su.user_id = #{userId} LIMIT 1
</select> </select>
<select id="page" parameterType="java.lang.Long" resultType="java.util.Map"> <select id="page" parameterType="java.lang.Long" resultType="java.util.Map">
select sum(xho.act_power_price+xho.act_service_price) select sum(xho.act_power_price+xho.act_service_price)
expenditure, expenditure,
xho.user_id userId,xho.serial_number serialNumber,xco.create_time createTime, xho.user_id userId,xho.serial_number serialNumber,xco.create_time createTime,
xcs.`name` chargingStationName,xho.`sorting_status` sortingStatus,xdb.dict_value sortingStatusName, xcs.`name` chargingStationName,xho.`sorting_status` sortingStatus,sdd.dict_label sortingStatusName,
xco.source, xco.source,
CASE WHEN xco.source = 0 THEN '平台' else xiu.`name` end sourceName CASE WHEN xco.source = 0 THEN '平台' else xiu.`name` end sourceName
from xhpc_history_order xho from xhpc_history_order xho
LEFT JOIN xhpc_charge_order xco on xco.charge_order_id = xho.charging_order_id LEFT JOIN xhpc_charge_order xco on xco.charge_order_id = xho.charging_order_id
LEFT JOIN xhpc_charging_station xcs on xcs.charging_station_id = xho.charging_station_id LEFT JOIN xhpc_charging_station xcs on xcs.charging_station_id = xho.charging_station_id
LEFT JOIN xhpc_operator xo on xo.operator_id = xcs.operator_id LEFT JOIN xhpc_operator xo on xo.operator_id = xcs.operator_id
LEFT JOIN xhpc_dict_biz xdb on xdb.`code` = 'sorting_status' and xdb.dict_key = xho.`sorting_status` LEFT JOIN sys_user su on xo.operator_id = su.operator_id
LEFT JOIN sys_dict_data sdd on sdd.`dict_type` = 'sorting_status' and sdd.dict_value = xho.`sorting_status`
<if test="chargingStation != null and chargingStation != ''"> <if test="chargingStation != null and chargingStation != ''">
LEFT JOIN xhpc_user_privilege xup on xup.charging_station_id = xcs.charging_station_id LEFT JOIN xhpc_user_privilege xup on xup.charging_station_id = xcs.charging_station_id
</if> </if>
LEFT JOIN sys_user su on su.user_id = xco.user_id
LEFT JOIN xhpc_internet_user xiu on xiu.internet_user_id = su.internet_user_id LEFT JOIN xhpc_internet_user xiu on xiu.internet_user_id = su.internet_user_id
where xho.del_flag = 0 where xho.del_flag = 0
<if test="userId != null and userId != ''"> <if test="userId != null and userId != ''">
and xho.user_id = #{userId} and su.user_id = #{userId}
</if> </if>
<if test="serialNumber != null and serialNumber != ''"> <if test="serialNumber != null and serialNumber != ''">
and xho.serial_number like concat(concat('%', #{serialNumber}), '%') and xho.serial_number like concat(concat('%', #{serialNumber}), '%')

View File

@ -9,6 +9,10 @@ import com.ruoyi.common.core.utils.HttpUtils;
import com.ruoyi.common.core.utils.StringUtils; import com.ruoyi.common.core.utils.StringUtils;
import com.ruoyi.common.core.utils.WXPayUtil; import com.ruoyi.common.core.utils.WXPayUtil;
import com.ruoyi.common.core.web.domain.AjaxResult; import com.ruoyi.common.core.web.domain.AjaxResult;
import com.xhpc.payment.domain.XhpcInternetUser;
import com.xhpc.payment.domain.XhpcRechargeOrder;
import com.xhpc.payment.mapper.XhpcUserAccountStatementMapper;
import com.xhpc.payment.service.IXhpcRechargeOrderService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.apache.http.HttpEntity; import org.apache.http.HttpEntity;
@ -20,19 +24,16 @@ import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients; import org.apache.http.impl.client.HttpClients;
import org.apache.http.ssl.SSLContexts; import org.apache.http.ssl.SSLContexts;
import org.apache.http.util.EntityUtils; import org.apache.http.util.EntityUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment; import org.springframework.core.env.Environment;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.net.ssl.SSLContext; import javax.net.ssl.SSLContext;
import javax.servlet.ServletInputStream; import javax.servlet.ServletInputStream;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.*; import java.io.*;
import java.math.BigDecimal;
import java.net.URL; import java.net.URL;
import java.net.URLConnection; import java.net.URLConnection;
import java.security.KeyStore; import java.security.KeyStore;
@ -48,42 +49,51 @@ import java.util.Random;
@Api(value = "微信支付接口", tags = "微信支付接口") @Api(value = "微信支付接口", tags = "微信支付接口")
public class WxPaymentController { public class WxPaymentController {
private static final Logger logger = LoggerFactory.getLogger(WxPaymentController.class);
private static final String SYMBOLS = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; private static final String SYMBOLS = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
private static final Random RANDOM = new SecureRandom(); private static final Random RANDOM = new SecureRandom();
@Autowired
private IXhpcRechargeOrderService iXhpcRechargeOrderService;
@Autowired
private XhpcUserAccountStatementMapper xhpcUserAccountStatementMapper;
@Autowired @Autowired
private Environment environment; private Environment environment;
@GetMapping("/payment") @PostMapping("/payment")
@ApiOperation(value = "微信支付") @ApiOperation(value = "微信支付")
public AjaxResult payment(HttpServletRequest servletRequest) throws Exception { public AjaxResult payment(HttpServletRequest servletRequest, @RequestBody Map<String, Object> map) throws Exception {
String openid = servletRequest.getParameter("openid"); String openid = StringUtils.valueOf(map.get("openid"));
if (StringUtils.isNull(openid)) { if (StringUtils.isNull(openid)) {
return AjaxResult.error(HttpStatus.BAD_REQUEST, "openid不能为空"); return AjaxResult.error(HttpStatus.BAD_REQUEST, "openid不能为空");
} }
//总金额()订单总金额单位为分 //总金额()订单总金额单位为分
String doubleValue = servletRequest.getParameter("doubleValue"); String amount = StringUtils.valueOf(map.get("amount"));
if (StringUtils.isNull(doubleValue)) { if (StringUtils.isNull(amount)) {
return AjaxResult.error(HttpStatus.BAD_REQUEST, "充值金额不能为空"); return AjaxResult.error(HttpStatus.BAD_REQUEST, "充值金额不能为空");
} }
Double amount = Double.parseDouble(doubleValue) * 100; //用户信息id
String userId = StringUtils.valueOf(map.get("userId"));
if (StringUtils.isNull(userId)) {
return AjaxResult.error(HttpStatus.BAD_REQUEST, "用户信息不能为空");
}
Double amount1 = Double.parseDouble(amount) * 100;
String orderNumber = "wx" + DateUtils.timePath(); String orderNumber = "wx" + DateUtils.timePath();
//此次生成充值订单
// OrderVO orderInfo = orderService.selectOrderNumber(orderNumber); if (0.0 == amount1) {
if (0.0 == amount) {
return AjaxResult.error(HttpStatus.BAD_REQUEST, "充值金额不能为0"); return AjaxResult.error(HttpStatus.BAD_REQUEST, "充值金额不能为0");
} }
//生成充值订单
XhpcRechargeOrder xhpcRechargeOrder = iXhpcRechargeOrderService.addRechargeOrder(userId, BigDecimal.valueOf(amount1), "1", orderNumber);
//附加数据() //附加数据()
String attach = attachYu(StringUtils.valueOf("123456"), StringUtils.valueOf(amount), null, orderNumber); String attach = attachYu(StringUtils.valueOf(xhpcRechargeOrder.getRechargeOrderId()), StringUtils.valueOf(amount), null, orderNumber);
//商品描述() //商品描述()
String body = "用户充值"; String body = "用户充值";
//商户订单号() //商户订单号()
String outTradeNo = orderNumber; String outTradeNo = orderNumber;
int Fee = amount.intValue(); int Fee = amount1.intValue();
//终端ip() //终端ip()
String spbillCreateIp = getRemoteLoginUserIp(servletRequest); String spbillCreateIp = getRemoteLoginUserIp(servletRequest);
//交易类型() //交易类型()
@ -141,46 +151,41 @@ public class WxPaymentController {
} }
} }
//app //app
//Map<String, String> sign = createSign(result, 1, orderInfo.getId(), environment.getProperty("KEY"), doubleValue, remarks); Map<String, String> sign = createSign(result.toString(), Double.parseDouble(amount));
// Map<String, String> sign = createSign(result, 1); return AjaxResult.success(sign);
Map<String, String> map = WXPayUtil.xmlToMap(result.toString());
return AjaxResult.success(map);
} }
/** /**
* 生成签名 * 生成签名
* *
* @param result xml格式字符串 * @param result xml格式字符串
* @param pageType 页面类型 1-APP 2-PC
* @return * @return
*/ */
public Map<String, String> createSign(String result, Integer pageType) { public Map<String, String> createSign(String result, Double amount) {
try { try {
Map<String, String> map = WXPayUtil.xmlToMap(result); Map<String, String> map = WXPayUtil.xmlToMap(result);
String return_code = map.get("return_code"); String return_code = map.get("return_code");
if ("FAIL".equals(return_code)) { if ("FAIL".equals(return_code)) {
return null; return null;
} else { } else {
if (pageType == 1) { //我这里是手动拼接的 可以使用微信具类生成签名
//我这里是手动拼接的 可以使用微信具类生成签名 String nonceStr = WXPayUtil.generateNonceStr();
String nonceStr = WXPayUtil.generateNonceStr(); Map<String, String> map1 = new HashMap<>();
Map<String, String> map1 = new HashMap<>(); map1.put("money", StringUtils.valueOf(amount));
map1.put("money", map.get("doubleValue")); map1.put("appid", map.get("appid"));
map1.put("appid", map.get("appid")); map1.put("prepayId", map.get("prepay_id"));
map1.put("prepayId", map.get("prepay_id")); map1.put("noncestr", nonceStr);
map1.put("noncestr", nonceStr); map1.put("nonceStr", nonceStr + "\",\"packageValue\":" + "\"Sign=WXPay\"");
map1.put("nonceStr", nonceStr + "\",\"packageValue\":" + "\"Sign=WXPay\""); map1.put("package", "Sign=WXPay");
map1.put("package", "Sign=WXPay"); map1.put("partnerid", map.get("mch_id"));
map1.put("partnerid", map.get("mch_id")); Long time = System.currentTimeMillis();
Long time = System.currentTimeMillis(); String timeStr = time.toString().substring(0, time.toString().length() - 3);
String timeStr = time.toString().substring(0, time.toString().length() - 3); map1.put("timestamp", timeStr);
map1.put("timestamp", timeStr); map1.put("sign", map.get("sign"));
map1.put("sign", map.get("sign")); map1.put("url", map.get("code_url"));
map1.put("url", map.get("code_url")); map1.put("key", environment.getProperty("KEY"));
map1.put("key", environment.getProperty("KEY")); return map1;
return map1;
}
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
@ -313,6 +318,14 @@ public class WxPaymentController {
return ip; return ip;
} }
/**
* 回调Api
*/
@RequestMapping("/test")
public void test() {
paymentCallback("wx20210728172854", "4200001199202107286896883790");
}
/** /**
* 修改支付订单 * 修改支付订单
* *
@ -321,30 +334,31 @@ public class WxPaymentController {
* @return * @return
* @throws Exception * @throws Exception
*/ */
public int paymentCallback(Map<String, String> map) throws Exception { public void paymentCallback(String out_trade_no, String transaction_id) {
String result_code = map.get("result_code"); System.out.println("+++++++++进入回调+" + out_trade_no);
String return_code = map.get("return_code"); System.out.println("+++++++++进入回调+" + transaction_id);
String out_trade_no = map.get("out_trade_no");
String openid = map.get("openid");
String transaction_id = map.get("transaction_id");
int flag = 0; int flag = 0;
//支付订单编号 //支付订单编号
/*OrderVO order = orderMapper.selectOrderNumber(out_trade_no); XhpcRechargeOrder xhpcRechargeOrder = iXhpcRechargeOrderService.infoRechargeOrderNumber(out_trade_no);
if (null != order) { if (StringUtils.isNotNull(xhpcRechargeOrder)) {
//检验是否需要再次回调刷新数据 xhpcRechargeOrder.setPrepayId(transaction_id);
//TODO 微信后台回调刷新订单支付状态等相关业务 xhpcRechargeOrder.setStatus(1);
addOrUpdatePaymentRecord(order.getId(), transaction_id); //修改充值订单状态
}*/ iXhpcRechargeOrderService.updateRechargeOrder(xhpcRechargeOrder.getRechargeOrderId(), "1", "1", transaction_id);
return flag; }
//增加用户余额
XhpcInternetUser xhpcInternetUser = new XhpcInternetUser();
xhpcInternetUser.setInternetUserId(xhpcRechargeOrder.getUserId());
xhpcInternetUser.setBalance(xhpcInternetUser.getBalance().add(xhpcRechargeOrder.getAmount()));
xhpcUserAccountStatementMapper.updateAppUserBalance(xhpcInternetUser);
} }
/** /**
* 回调Api * 回调Api
*/ */
@RequestMapping("/paymentCallback") @RequestMapping("/paymentCallback")
public Object payNotify(HttpServletRequest request, HttpServletResponse response) { public Object payNotify(HttpServletRequest request, HttpServletResponse response) {
System.out.println("+++++++++进入回调");
try { try {
ServletInputStream in = null; ServletInputStream in = null;
BufferedReader reader = null; BufferedReader reader = null;
@ -368,7 +382,6 @@ public class WxPaymentController {
e.printStackTrace(); e.printStackTrace();
} }
} }
System.out.println("+++++++++" + content.toString());
//将xml转换成map //将xml转换成map
Map<String, String> map = WXPayUtil.xmlToMap(content.toString()); Map<String, String> map = WXPayUtil.xmlToMap(content.toString());
String return_code = map.get("return_code"); String return_code = map.get("return_code");
@ -376,7 +389,9 @@ public class WxPaymentController {
//如果返回成功 //如果返回成功
if ("SUCCESS".equals(return_code)) { if ("SUCCESS".equals(return_code)) {
//将自定义参数转换成JSONObject对象处理业务逻辑 //将自定义参数转换成JSONObject对象处理业务逻辑
paymentCallback(map); String out_trade_no = map.get("out_trade_no");
String transaction_id = map.get("transaction_id");
paymentCallback(out_trade_no, transaction_id);
} }
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); e.printStackTrace();
@ -401,18 +416,25 @@ public class WxPaymentController {
} }
/** /**
* 企业退款 * 企业退款
* *
* @return * @return
*/ */
@GetMapping("/enterpriseCheckOut") @PostMapping("/enterpriseCheckOut")
@ApiOperation(value = "企业退款") @ApiOperation(value = "企业退款")
public Object enterpriseCheckOut(String openid, double amount) { public Object enterpriseCheckOut(@RequestBody Map<String, Object> map) {
String openid = StringUtils.valueOf(map.get("openid"));
if (StringUtils.isNull(openid)) {
return AjaxResult.error(HttpStatus.BAD_REQUEST, "openid不能为空");
}
//总金额()订单总金额单位为分
String amount = StringUtils.valueOf(map.get("amount"));
if (StringUtils.isNull(amount)) {
return AjaxResult.error(HttpStatus.BAD_REQUEST, "充值金额不能为空");
}
String reason = "退款申请"; String reason = "退款申请";
return enterpriseOut(amount, openid, reason); return enterpriseOut(Double.parseDouble(amount), openid, reason);
} }
@ -464,7 +486,7 @@ public class WxPaymentController {
/** /**
* 加载证书 * 加载证书
* *
* @param 证书位置 * @param
* @throws Exception * @throws Exception
*/ */
private CloseableHttpClient initCert() throws Exception { private CloseableHttpClient initCert() throws Exception {

View File

@ -36,7 +36,7 @@ public class XhpcRechargeOrderController extends BaseController {
} }
/** /**
* 充值订单页列表 * 充值订单页列表
*/ */
//@PreAuthorize(hasPermi = "refund:order:page") //@PreAuthorize(hasPermi = "refund:order:page")
@GetMapping("/page") @GetMapping("/page")

View File

@ -28,7 +28,7 @@ public class XhpcRefundAuditController extends BaseController {
* @return * @return
*/ */
@GetMapping("/examine") @GetMapping("/examine")
@ApiOperation(value = "退款审核详情") @ApiOperation(value = "退款审核")
public AjaxResult info(@RequestBody XhpcRefundAudit xhpcRefundAudit) { public AjaxResult info(@RequestBody XhpcRefundAudit xhpcRefundAudit) {
return AjaxResult.success(iXhpcRefundAuditService.insert(xhpcRefundAudit)); return AjaxResult.success(iXhpcRefundAuditService.insert(xhpcRefundAudit));
} }

View File

@ -4,6 +4,7 @@ import com.ruoyi.common.core.web.controller.BaseController;
import com.ruoyi.common.core.web.page.TableDataInfo; import com.ruoyi.common.core.web.page.TableDataInfo;
import com.xhpc.payment.service.IXhpcUserAccountStatementService; import com.xhpc.payment.service.IXhpcUserAccountStatementService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
@ -22,11 +23,16 @@ public class XhpcUserAccountStatementController extends BaseController {
private IXhpcUserAccountStatementService iXhpcUserAccountStatementService; private IXhpcUserAccountStatementService iXhpcUserAccountStatementService;
/** /**
* 用户流水页列表 * 用户流水分页列表
*
* @param appUserId C端用户id
* @return
*/ */
@ApiOperation(value = "用户流水分页列表")
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo page(@RequestParam Long refundOrderId) { public TableDataInfo page(@RequestParam Long appUserId) {
List<Map<String, Object>> list = iXhpcUserAccountStatementService.list(refundOrderId); startPage();
List<Map<String, Object>> list = iXhpcUserAccountStatementService.page(appUserId);
return getDataTable(list); return getDataTable(list);
} }
} }

View File

@ -0,0 +1,286 @@
package com.xhpc.payment.domain;
import com.ruoyi.common.core.web.domain.BaseEntity;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;
/**
* 流量用户 xhpc_internet_user
*
* @author ruoyi
*/
public class XhpcInternetUser extends BaseEntity {
/**
* 用户id
*/
private Long internetUserId;
/**
* 名称
*/
@NotBlank(message = "名称不能为空")
@Length(max = 12, message = "名称不能超过12位")
private String name;
/**
* 手机号码帐号
*/
@NotBlank(message = "手机号码不能为空")
@Length(max = 11, message = "手机号码不能超过11位")
private String phone;
/**
* 联系人
*/
@NotBlank(message = "联系人不能为空")
@Length(max = 12, message = "联系人不能超过12位")
private String contactName;
/**
* 联系人电话
*/
@NotBlank(message = "联系人电话不能为空")
@Length(max = 11, message = "联系人电话不能超过11位")
private String contactPhone;
/**
* 开户行
*/
@NotBlank(message = "开户行不能为空")
@Length(max = 20, message = "开户行电话不能超过20位")
private String openBank;
/**
* 卡号
*/
@NotNull(message = "卡号不能为空")
@Length(max = 20, message = "卡号不能超过20位")
private String cardNumber;
/**
* 合作开始时间
*/
private Date cooperationStartTime;
/**
* 合作结束时间
*/
private Date cooperationEndTime;
/**
* 余额
*/
private BigDecimal balance;
/**
* 地址code
*/
@NotNull(message = "地址不能为空")
private Integer areaCode;
/**
* 地址
*/
@NotBlank(message = "地址不能为空")
@Length(max = 50, message = "地址不能超过50位")
private String address;
/**
* 详细地址
*/
@NotBlank(message = "详细地址不能为空")
@Length(max = 50, message = "详细地址不能超过50位")
private String detailedAddress;
/**
* 提成类型0总金额提成 1服务费提成
*/
@NotNull(message = "提成类型不能为空")
private Integer commissionType;
/**
* 提成率
*/
@NotNull(message = "提成率不能为空")
private Double commissionRate;
/**
* 经度
*/
@NotBlank(message = "经度不能为空")
private String longitude;
/**
* 纬度
*/
@NotBlank(message = "纬度不能为空")
private String latitude;
/**
* 帐号状态
*/
private Integer status;
/**
* 删除标志0代表存在 2代表删除
*/
private String delFlag;
public Long getInternetUserId() {
return internetUserId;
}
public void setInternetUserId(Long internetUserId) {
this.internetUserId = internetUserId;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
public String getContactName() {
return contactName;
}
public void setContactName(String contactName) {
this.contactName = contactName;
}
public String getContactPhone() {
return contactPhone;
}
public void setContactPhone(String contactPhone) {
this.contactPhone = contactPhone;
}
public String getOpenBank() {
return openBank;
}
public void setOpenBank(String openBank) {
this.openBank = openBank;
}
public String getCardNumber() {
return cardNumber;
}
public void setCardNumber(String cardNumber) {
this.cardNumber = cardNumber;
}
public Date getCooperationStartTime() {
return cooperationStartTime;
}
public void setCooperationStartTime(Date cooperationStartTime) {
this.cooperationStartTime = cooperationStartTime;
}
public Date getCooperationEndTime() {
return cooperationEndTime;
}
public void setCooperationEndTime(Date cooperationEndTime) {
this.cooperationEndTime = cooperationEndTime;
}
public BigDecimal getBalance() {
return balance;
}
public void setBalance(BigDecimal balance) {
this.balance = balance;
}
public Integer getAreaCode() {
return areaCode;
}
public void setAreaCode(Integer areaCode) {
this.areaCode = areaCode;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public String getDetailedAddress() {
return detailedAddress;
}
public void setDetailedAddress(String detailedAddress) {
this.detailedAddress = detailedAddress;
}
public Integer getCommissionType() {
return commissionType;
}
public void setCommissionType(Integer commissionType) {
this.commissionType = commissionType;
}
public Double getCommissionRate() {
return commissionRate;
}
public void setCommissionRate(Double commissionRate) {
this.commissionRate = commissionRate;
}
public String getLongitude() {
return longitude;
}
public void setLongitude(String longitude) {
this.longitude = longitude;
}
public String getLatitude() {
return latitude;
}
public void setLatitude(String latitude) {
this.latitude = latitude;
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public String getDelFlag() {
return delFlag;
}
public void setDelFlag(String delFlag) {
this.delFlag = delFlag;
}
}

View File

@ -26,7 +26,7 @@ public class XhpcRechargeOrder extends BaseEntity {
/** /**
* 充值订单编号 * 充值订单编号
*/ */
private Long rechargeOrderNumber; private String rechargeOrderNumber;
/** /**
* 微信支付订单号 * 微信支付订单号
@ -122,4 +122,12 @@ public class XhpcRechargeOrder extends BaseEntity {
public void setType(Integer type) { public void setType(Integer type) {
this.type = type; this.type = type;
} }
public String getRechargeOrderNumber() {
return rechargeOrderNumber;
}
public void setRechargeOrderNumber(String rechargeOrderNumber) {
this.rechargeOrderNumber = rechargeOrderNumber;
}
} }

View File

@ -28,6 +28,13 @@ public class XhpcUserAccountStatement extends BaseEntity {
*/ */
private BigDecimal amount; private BigDecimal amount;
/**
* 余额
*/
private BigDecimal remainingSum;
/** /**
* 充电订单id * 充电订单id
*/ */
@ -43,6 +50,11 @@ public class XhpcUserAccountStatement extends BaseEntity {
*/ */
private Long refundOrderId; private Long refundOrderId;
/**
* 类型1充值 2退款 3充电
*/
private Integer type;
/** /**
* 状态0正常 1停用 * 状态0正常 1停用
*/ */
@ -116,4 +128,20 @@ public class XhpcUserAccountStatement extends BaseEntity {
public void setDelFlag(Integer delFlag) { public void setDelFlag(Integer delFlag) {
this.delFlag = delFlag; this.delFlag = delFlag;
} }
public Integer getType() {
return type;
}
public void setType(Integer type) {
this.type = type;
}
public BigDecimal getRemainingSum() {
return remainingSum;
}
public void setRemainingSum(BigDecimal remainingSum) {
this.remainingSum = remainingSum;
}
} }

View File

@ -48,4 +48,12 @@ public interface XhpcRechargeOrderMapper {
* @return * @return
*/ */
public List<Map<String, Object>> page(@Param("phone") String phone, @Param("rechargeOrderNumber") String rechargeOrderNumber, @Param("status") String status, @Param("createTimeStart") String createTimeStart, @Param("createTimeEnd") String createTimeEnd); public List<Map<String, Object>> page(@Param("phone") String phone, @Param("rechargeOrderNumber") String rechargeOrderNumber, @Param("status") String status, @Param("createTimeStart") String createTimeStart, @Param("createTimeEnd") String createTimeEnd);
/**
* 查询充值订单详情
*
* @param rechargeOrderNumber 充值订单编号
* @return 结果
*/
public XhpcRechargeOrder infoRechargeOrderNumber(@Param("rechargeOrderNumber") String rechargeOrderNumber);
} }

View File

@ -1,5 +1,6 @@
package com.xhpc.payment.mapper; package com.xhpc.payment.mapper;
import com.xhpc.payment.domain.XhpcInternetUser;
import com.xhpc.payment.domain.XhpcUserAccountStatement; import com.xhpc.payment.domain.XhpcUserAccountStatement;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
@ -22,10 +23,27 @@ public interface XhpcUserAccountStatementMapper {
public int insert(XhpcUserAccountStatement xhpcUserAccountStatement); public int insert(XhpcUserAccountStatement xhpcUserAccountStatement);
/** /**
* 用户流水列表 * 用户流水分页列表
* *
* @param refundOrderId * @param appUserId C端用户id
* @return * @return
*/ */
public List<Map<String, Object>> list(@Param("refundOrderId") Long refundOrderId); public List<Map<String, Object>> page(@Param("appUserId") Long appUserId);
/**
* 获取用户信息
*
* @param appUserId C端用户id
* @return
*/
public Map<String, Object> appUserInfo(@Param("appUserId") Long appUserId);
/**
* 更新C端用户余额
*
* @param xhpcInternetUser C端用户
* @return
*/
public int updateAppUserBalance(XhpcInternetUser xhpcInternetUser);
} }

View File

@ -48,7 +48,7 @@ public interface IXhpcRechargeOrderService {
* @param type 充值渠道1微信 2支付宝 * @param type 充值渠道1微信 2支付宝
* @return * @return
*/ */
public XhpcRechargeOrder addRechargeOrder(String appUserId, BigDecimal amount, String type); public XhpcRechargeOrder addRechargeOrder(String appUserId, BigDecimal amount, String type, String orderNumber);
/** /**
* 修改订单状态 充值订单 * 修改订单状态 充值订单
@ -59,4 +59,12 @@ public interface IXhpcRechargeOrderService {
* @return * @return
*/ */
public void updateRechargeOrder(Long rechargeOrderId, String type, String status, String paymentNumber); public void updateRechargeOrder(Long rechargeOrderId, String type, String status, String paymentNumber);
/**
* 充值订单详情
*
* @param rechargeOrderNumber 充值订单编号
* @return 结果
*/
public XhpcRechargeOrder infoRechargeOrderNumber(String rechargeOrderNumber);
} }

View File

@ -20,11 +20,11 @@ public interface IXhpcUserAccountStatementService {
public int insert(XhpcUserAccountStatement xhpcUserAccountStatement); public int insert(XhpcUserAccountStatement xhpcUserAccountStatement);
/** /**
* 用户流水列表 * 用户流水分页列表
* *
* @param refundOrderId * @param appUserId C端用户id
* @return * @return
*/ */
public List<Map<String, Object>> list(Long refundOrderId); public List<Map<String, Object>> page(Long appUserId);
} }

View File

@ -2,9 +2,7 @@ package com.xhpc.payment.service.impl;
import com.ruoyi.common.core.utils.StringUtils; import com.ruoyi.common.core.utils.StringUtils;
import com.xhpc.payment.domain.XhpcRechargeOrder; import com.xhpc.payment.domain.XhpcRechargeOrder;
import com.xhpc.payment.domain.XhpcUserAccountStatement;
import com.xhpc.payment.mapper.XhpcRechargeOrderMapper; import com.xhpc.payment.mapper.XhpcRechargeOrderMapper;
import com.xhpc.payment.mapper.XhpcUserAccountStatementMapper;
import com.xhpc.payment.service.IXhpcRechargeOrderService; import com.xhpc.payment.service.IXhpcRechargeOrderService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -25,7 +23,7 @@ public class XhpcRechargeOrderServiceImpl implements IXhpcRechargeOrderService {
private XhpcRechargeOrderMapper xhpcRechargeOrderMapper; private XhpcRechargeOrderMapper xhpcRechargeOrderMapper;
@Autowired @Autowired
private XhpcUserAccountStatementMapper xhpcUserAccountStatementMapper; private XhpcUserAccountStatementServiceImpl xhpcUserAccountStatementService;
/** /**
* 更新 充值订单 * 更新 充值订单
@ -73,10 +71,11 @@ public class XhpcRechargeOrderServiceImpl implements IXhpcRechargeOrderService {
* @return * @return
*/ */
@Override @Override
public XhpcRechargeOrder addRechargeOrder(String appUserId, BigDecimal amount, String type) { public XhpcRechargeOrder addRechargeOrder(String appUserId, BigDecimal amount, String type, String orderNumber) {
XhpcRechargeOrder xhpcRechargeOrder = new XhpcRechargeOrder(); XhpcRechargeOrder xhpcRechargeOrder = new XhpcRechargeOrder();
xhpcRechargeOrder.setUserId(Long.parseLong(appUserId)); xhpcRechargeOrder.setUserId(Long.parseLong(appUserId));
xhpcRechargeOrder.setAmount(amount); xhpcRechargeOrder.setAmount(amount);
xhpcRechargeOrder.setRechargeOrderNumber(orderNumber);
xhpcRechargeOrder.setType(Integer.parseInt(type)); xhpcRechargeOrder.setType(Integer.parseInt(type));
xhpcRechargeOrderMapper.insert(xhpcRechargeOrder); xhpcRechargeOrderMapper.insert(xhpcRechargeOrder);
return xhpcRechargeOrder; return xhpcRechargeOrder;
@ -102,14 +101,21 @@ public class XhpcRechargeOrderServiceImpl implements IXhpcRechargeOrderService {
} }
if ("1".equals(xhpcRechargeOrder.getStatus())) { if ("1".equals(xhpcRechargeOrder.getStatus())) {
Map<String, Object> map = xhpcRechargeOrderMapper.info(rechargeOrderId); Map<String, Object> map = xhpcRechargeOrderMapper.info(rechargeOrderId);
XhpcUserAccountStatement xhpcUserAccountStatement = new XhpcUserAccountStatement(); String amount = StringUtils.valueOf(map.get("amount"));
String amount = "-" + StringUtils.valueOf(map.get("amount")); String userId = StringUtils.valueOf(map.get("userId"));
String userId = StringUtils.valueOf(map.get("uUserId")); xhpcUserAccountStatementService.add(rechargeOrderId, amount, userId, 1);
xhpcUserAccountStatement.setAmount(BigDecimal.valueOf(Double.valueOf(amount)));
xhpcUserAccountStatement.setRechargeOrderId(rechargeOrderId);
xhpcUserAccountStatement.setUserId(Long.parseLong(userId));
xhpcUserAccountStatementMapper.insert(xhpcUserAccountStatement);
} }
xhpcRechargeOrderMapper.update(xhpcRechargeOrder); xhpcRechargeOrderMapper.update(xhpcRechargeOrder);
} }
/**
* 充值订单详情
*
* @param rechargeOrderNumber 充值订单编号
* @return 结果
*/
@Override
public XhpcRechargeOrder infoRechargeOrderNumber(String rechargeOrderNumber) {
return xhpcRechargeOrderMapper.infoRechargeOrderNumber(rechargeOrderNumber);
}
} }

View File

@ -1,5 +1,6 @@
package com.xhpc.payment.service.impl; package com.xhpc.payment.service.impl;
import com.ruoyi.common.core.utils.StringUtils;
import com.xhpc.payment.domain.XhpcRefundAudit; import com.xhpc.payment.domain.XhpcRefundAudit;
import com.xhpc.payment.domain.XhpcRefundOrder; import com.xhpc.payment.domain.XhpcRefundOrder;
import com.xhpc.payment.mapper.XhpcRefundAuditMapper; import com.xhpc.payment.mapper.XhpcRefundAuditMapper;
@ -25,6 +26,9 @@ public class XhpcRefundAuditServiceImpl implements IXhpcRefundAuditService {
@Autowired @Autowired
private XhpcRefundOrderMapper xhpcRefundOrderMapper; private XhpcRefundOrderMapper xhpcRefundOrderMapper;
@Autowired
private XhpcUserAccountStatementServiceImpl xhpcUserAccountStatementService;
/** /**
* 新增 退款审核 * 新增 退款审核
* *
@ -34,8 +38,14 @@ public class XhpcRefundAuditServiceImpl implements IXhpcRefundAuditService {
public int insert(XhpcRefundAudit xhpcRefundAudit) { public int insert(XhpcRefundAudit xhpcRefundAudit) {
XhpcRefundOrder xhpcRefundOrder = new XhpcRefundOrder(); XhpcRefundOrder xhpcRefundOrder = new XhpcRefundOrder();
xhpcRefundOrder.setRefundOrderId(xhpcRefundAudit.getRefundOrderId()); xhpcRefundOrder.setRefundOrderId(xhpcRefundAudit.getRefundOrderId());
xhpcRefundOrder.setStatus(xhpcRefundAudit.getStatus()); xhpcRefundOrder.setExamineStatus(xhpcRefundAudit.getStatus());
xhpcRefundOrderMapper.update(xhpcRefundOrder); xhpcRefundOrderMapper.update(xhpcRefundOrder);
if ("1".equals(xhpcRefundOrder.getStatus())) {
Map<String, Object> map = xhpcRefundOrderMapper.info(xhpcRefundOrder.getRefundOrderId());
String amount = "-" + StringUtils.valueOf(map.get("amount"));
String userId = StringUtils.valueOf(map.get("userId"));
xhpcUserAccountStatementService.add(xhpcRefundAudit.getRefundOrderId(), amount, userId, 2);
}
return xhpcRefundAuditMapper.insert(xhpcRefundAudit); return xhpcRefundAuditMapper.insert(xhpcRefundAudit);
} }

View File

@ -1,10 +1,7 @@
package com.xhpc.payment.service.impl; package com.xhpc.payment.service.impl;
import com.ruoyi.common.core.utils.StringUtils;
import com.xhpc.payment.domain.XhpcRefundOrder; import com.xhpc.payment.domain.XhpcRefundOrder;
import com.xhpc.payment.domain.XhpcUserAccountStatement;
import com.xhpc.payment.mapper.XhpcRefundOrderMapper; import com.xhpc.payment.mapper.XhpcRefundOrderMapper;
import com.xhpc.payment.mapper.XhpcUserAccountStatementMapper;
import com.xhpc.payment.service.IXhpcRefundOrderService; import com.xhpc.payment.service.IXhpcRefundOrderService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -24,8 +21,6 @@ public class XhpcRefundOrderServiceImpl implements IXhpcRefundOrderService {
@Autowired @Autowired
private XhpcRefundOrderMapper xhpcRefundOrderMapper; private XhpcRefundOrderMapper xhpcRefundOrderMapper;
@Autowired
private XhpcUserAccountStatementMapper xhpcUserAccountStatementMapper;
/** /**
* 更新 退款订单 * 更新 退款订单
@ -99,16 +94,7 @@ public class XhpcRefundOrderServiceImpl implements IXhpcRefundOrderService {
} else { } else {
xhpcRefundOrder.setAlipayNumber(paymentNumber); xhpcRefundOrder.setAlipayNumber(paymentNumber);
} }
if ("1".equals(xhpcRefundOrder.getStatus())) {
Map<String, Object> map = xhpcRefundOrderMapper.info(refundOrderId);
XhpcUserAccountStatement xhpcUserAccountStatement = new XhpcUserAccountStatement();
String amount = "-" + StringUtils.valueOf(map.get("amount"));
String userId = StringUtils.valueOf(map.get("uUserId"));
xhpcUserAccountStatement.setAmount(BigDecimal.valueOf(Double.valueOf(amount)));
xhpcUserAccountStatement.setRefundOrderId(refundOrderId);
xhpcUserAccountStatement.setUserId(Long.parseLong(userId));
xhpcUserAccountStatementMapper.insert(xhpcUserAccountStatement);
}
xhpcRefundOrderMapper.update(xhpcRefundOrder); xhpcRefundOrderMapper.update(xhpcRefundOrder);
} }
} }

View File

@ -1,11 +1,13 @@
package com.xhpc.payment.service.impl; package com.xhpc.payment.service.impl;
import com.ruoyi.common.core.utils.StringUtils;
import com.xhpc.payment.domain.XhpcUserAccountStatement; import com.xhpc.payment.domain.XhpcUserAccountStatement;
import com.xhpc.payment.mapper.XhpcUserAccountStatementMapper; import com.xhpc.payment.mapper.XhpcUserAccountStatementMapper;
import com.xhpc.payment.service.IXhpcUserAccountStatementService; import com.xhpc.payment.service.IXhpcUserAccountStatementService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.math.BigDecimal;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -31,13 +33,41 @@ public class XhpcUserAccountStatementServiceImpl implements IXhpcUserAccountStat
} }
/** /**
* 用户流水列表 * 用户流水分页列表
* *
* @param refundOrderId * @param appUserId C端用户id
* @return * @return
*/ */
@Override @Override
public List<Map<String, Object>> list(Long refundOrderId) { public List<Map<String, Object>> page(Long appUserId) {
return xhpcUserAccountStatementMapper.list(refundOrderId); return xhpcUserAccountStatementMapper.page(appUserId);
}
/**
* 用户费用变化产生流水
*
* @param id 操作id
* @param amount 变化金额
* @param userId 用户id
* @param type 操作类型1充值 2退款 3充电
*/
public void add(Long id, String amount, String userId, Integer type) {
XhpcUserAccountStatement xhpcUserAccountStatement = new XhpcUserAccountStatement();
xhpcUserAccountStatement.setAmount(BigDecimal.valueOf(Double.valueOf(amount)));
if (1 == type) {
xhpcUserAccountStatement.setRechargeOrderId(id);
} else if (2 == type) {
xhpcUserAccountStatement.setRefundOrderId(id);
} else {
xhpcUserAccountStatement.setChargeOrderId(id);
}
xhpcUserAccountStatement.setUserId(Long.parseLong(userId));
xhpcUserAccountStatement.setType(type);
Map<String, Object> appUserInfo = xhpcUserAccountStatementMapper.appUserInfo(Long.parseLong(userId));
if (StringUtils.isNotNull(appUserInfo)) {
String balance = StringUtils.valueOf(appUserInfo.get("balance"));
xhpcUserAccountStatement.setRemainingSum(BigDecimal.valueOf(Double.valueOf(balance)));
}
xhpcUserAccountStatementMapper.insert(xhpcUserAccountStatement);
} }
} }

View File

@ -4,7 +4,7 @@ ppsvc:
# Tomcat # Tomcat
server: server:
port: 9802 port: 9803
# Spring # Spring
spring: spring:
@ -18,16 +18,15 @@ spring:
nacos: nacos:
discovery: discovery:
# 服务注册地址 # 服务注册地址
server-addr: 118.24.137.203:8848 server-addr: 127.0.0.1:8848
config: config:
# 配置中心地址 # 配置中心地址
server-addr: 118.24.137.203:8848 server-addr: 127.0.0.1:8848
# 配置文件格式 # 配置文件格式
file-extension: yml file-extension: yml
# 共享配置 # 共享配置
shared-configs: shared-configs:
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
##获取微信openid地址 ##获取微信openid地址
WXGETJSCODE: "https://api.weixin.qq.com/sns/jscode2session?appid=wxb14ef93e9b7901f3&secret=b5c5672141b5930c30a1abee95a2dcbf&js_code=" WXGETJSCODE: "https://api.weixin.qq.com/sns/jscode2session?appid=wxb14ef93e9b7901f3&secret=b5c5672141b5930c30a1abee95a2dcbf&js_code="
##阿里云身份证验证地址 ##阿里云身份证验证地址
@ -42,11 +41,13 @@ MCHID: "1514355771"
KEY: "sichuanxianghuakejiyouxiangongsi" KEY: "sichuanxianghuakejiyouxiangongsi"
#微信小程序支付地址 #微信小程序支付地址
WXPAYUNIFIEDORDER: "https://api.mch.weixin.qq.com/pay/unifiedorder" WXPAYUNIFIEDORDER: "https://api.mch.weixin.qq.com/pay/unifiedorder"
#支付回调地址 #微信支付回调地址
SERVERDOMAIN: "https://cdz.project2.tingsun.net/wx/paymentCallback" SERVERDOMAIN: "http://cdz.project2.tingsun.net/prod-api/xhpc-payment/wx/paymentCallback"
#支付宝支付回调地址
ALIPAYPSERVERDOMAIN: "https://cdz.project2.tingsun.net/alipay/paymentCallback"
#支付宝公钥 #支付宝公钥
ALIPAYPUBLICKEY: "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAjHDksTgZTpf0wh7oeTVRp0h3SqzTM2smjEJnx9jF1+q3WSXLRB4OzSzq7VsJ/szcyK10ZGO5PxeQ4u9GAG/U+7xhs7ei1cJB/Er55Sg9SbjfkTpwlDv181UJCRJJ/IAcqyqezwTpB8e2trYmHKovUdt0KR9/tVkGa7hsNd5GfxTOUaAFc3zADqRVM+wGimtG0NYfOF2f8tkmBEAiMMLKq5pbAnHU723a1cm/nfVp7gvXfsnO0k2GvRuHzb8mxIhWLiAnwdK9gEu5za/jWxo/xIvf2sdJPYdWj+yfyzA2e1fJkx4uRUzX31CXxZvP2/tfEcnTdI0gxN+OH2eAMiPVswIDAQAB" ALIPAYPUBLICKEY: "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA5NOLLMj/cWU+SOZ6NR6vXnmeEZPq7UYeuyPvouFzqphQ9nuGPB7GkhZQnzGdhXVnUWw01HjezDzOkKCW9Jl4cG6+tVyqJt4FWrAylEeSxkbnNLeRohXg1ZaBV4hU76Y/WOW2R4uHD/9oX9pna7U8NJJJrqQiBdRAjSTt1cHTgXlkDKzhmiBm6Nw71rZeaETeB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73TwgFleHFr5RdchTsGU3GBWmHUUpmLzWDYtEe5hwA4jZDw6dZapAoGBAKsr9GImz8vsKjfzQJMj8OC18ch+U29nwkhjHPnjtE4Zjf7izUC2x8b1EWa59pqXIPv9Kgb2aP2MX/fQHtUwNaRza9vfbRcG4qaATKWNIsV2BR+yI/SP7Hdt7fNfv1Jbivj42zj0HyTNXA7E4GPiZpKMYaXt56JouyoRbBnMoakO"
#支付宝appid #支付宝appid
ALIPAYAPPID: "2021002156615717" ALIPAYAPPID: "2021002156615717"

View File

@ -7,6 +7,7 @@
<resultMap type="com.xhpc.payment.domain.XhpcRechargeOrder" id="XhpcRechargeOrderResult"> <resultMap type="com.xhpc.payment.domain.XhpcRechargeOrder" id="XhpcRechargeOrderResult">
<result column="recharge_order_id" property="rechargeOrderId" /> <result column="recharge_order_id" property="rechargeOrderId" />
<result column="user_id" property="userId" /> <result column="user_id" property="userId" />
<result column="recharge_order_number" property="rechargeOrderNumber"/>
<result column="prepay_id" property="prepayId" /> <result column="prepay_id" property="prepayId" />
<result column="alipay_number" property="alipayNumber" /> <result column="alipay_number" property="alipayNumber" />
<result column="amount" property="amount" /> <result column="amount" property="amount" />
@ -130,28 +131,28 @@
</update> </update>
<select id="info" parameterType="java.lang.Long" resultType="java.util.Map"> <select id="info" parameterType="java.lang.Long" resultType="java.util.Map">
select xro.recharge_order_id rechargeOrderId ,xro.refund_order_number refundOrderNumber, select xro.recharge_order_id rechargeOrderId ,xro.recharge_order_number rechargeOrderNumber,
xro.alipay_number alipayNumber ,xro.prepay_id prepayid,xro.user_id userId,xro.amount, xro.alipay_number alipayNumber ,xro.prepay_id prepayid,xro.user_id userId,xro.amount,
xro.type ,xro.`status`,xro.create_time createTime,xau.phone,xdb.dict_value statusName xro.type ,xro.`status`,xro.create_time createTime,xau.phone,sdd.dict_label statusName
from xhpc_recharge_order xro from xhpc_recharge_order xro
LEFT JOIN xhpc_app_user xau on xau.app_user_id = xro.user_id LEFT JOIN xhpc_app_user xau on xau.app_user_id = xro.user_id
LEFT JOIN xhpc_dict_biz xdb on xdb.`code` = 'recharge_order_status' and xdb.dict_key = xro.`status` LEFT JOIN sys_dict_data sdd on sdd.`dict_type` = 'recharge_order_status' and sdd.dict_value = xro.`status`
where xro.del_flag = 0 and xro.recharge_order_id = #{rechargeOrderId} where xro.del_flag = 0 and xro.recharge_order_id = #{rechargeOrderId}
</select> </select>
<select id="page" parameterType="java.lang.Long" resultType="java.util.Map"> <select id="page" parameterType="java.lang.Long" resultType="java.util.Map">
select xro.recharge_order_id rechargeOrderId ,xro.refund_order_number refundOrderNumber, select xro.recharge_order_id rechargeOrderId ,xro.recharge_order_number rechargeOrderNumber,
xro.alipay_number alipayNumber ,xro.prepay_id prepayid,xro.user_id userId,xro.amount, xro.alipay_number alipayNumber ,xro.prepay_id prepayid,xro.user_id userId,xro.amount,
xro.type ,xro.`status`,xro.create_time createTime,xau.phone,xdb.dict_value statusName xro.type ,xro.`status`,xro.create_time createTime,xau.phone,sdd.dict_label statusName
from xhpc_recharge_order xro from xhpc_recharge_order xro
LEFT JOIN xhpc_app_user xau on xau.app_user_id = xro.user_id LEFT JOIN xhpc_app_user xau on xau.app_user_id = xro.user_id
LEFT JOIN xhpc_dict_biz xdb on xdb.`code` = 'recharge_order_status' and xdb.dict_key = xro.`status` LEFT JOIN sys_dict_data sdd on sdd.`dict_type` = 'recharge_order_status' and sdd.dict_value = xro.`status`
where xro.del_flag = 0 where xro.del_flag = 0
<if test="phone != null and phone != ''"> <if test="phone != null and phone != ''">
and xau.phone like concat(concat('%', #{phone}), '%') and xau.phone like concat(concat('%', #{phone}), '%')
</if> </if>
<if test="rechargeOrderNumber != null and rechargeOrderNumber != ''"> <if test="rechargeOrderNumber != null and rechargeOrderNumber != ''">
and xro.refund_order_number like concat(concat('%', #{rechargeOrderNumber}), '%') and xro.recharge_order_number like concat(concat('%', #{rechargeOrderNumber}), '%')
</if> </if>
<if test="status != null and status != ''"> <if test="status != null and status != ''">
and xro.status like concat(concat('%', #{status}), '%') and xro.status like concat(concat('%', #{status}), '%')
@ -165,4 +166,9 @@
ORDER BY xro.create_time DESC ORDER BY xro.create_time DESC
</select> </select>
<select id="infoRechargeOrderNumber" parameterType="java.lang.Long" resultMap="XhpcRechargeOrderResult">
select *
from xhpc_recharge_order xro
where xro.del_flag = 0 and xro.recharge_order_number = #{rechargeOrderNumber}
</select>
</mapper> </mapper>

View File

@ -75,11 +75,14 @@
<select id="list" parameterType="java.lang.Long" resultType="java.util.Map"> <select id="list" parameterType="java.lang.Long" resultType="java.util.Map">
select xro.refund_order_id refundOrderId , select xro.refund_order_id refundOrderId ,
xro.`status`,xdb.dict_value statusName, xro.`status`, xau.phone,sdd.dict_label statusName,sdds.dict_label examineStatusName,
xra.remark,xra.create_time createTime xra.remark,xra.create_time createTime,xro.examine_status examineStatus
from xhpc_refund_audit xra from xhpc_refund_audit xra
LEFT JOIN xhpc_refund_order xro on xra.refund_order_id = xro.refund_order_id LEFT JOIN xhpc_refund_order xro on xra.refund_order_id = xro.refund_order_id
LEFT JOIN xhpc_dict_biz xdb on xdb.`code` = 'refund_order_status' and xdb.dict_key = xro.`status` LEFT JOIN xhpc_app_user xau on xau.app_user_id = xro.user_id
LEFT JOIN sys_dict_data sdd on sdd.`dict_type` = 'refund_order_status' and sdd.dict_value = xro.`status`
LEFT JOIN sys_dict_data sdds on sdds.`dict_type` = 'refund_examine_status' and sdds.dict_value =
xro.examine_status
where xra.del_flag = 0 where xra.del_flag = 0
<if test="refundOrderId != null and refundOrderId != ''"> <if test="refundOrderId != null and refundOrderId != ''">
and xro.refund_order_id = #{refundOrderId} and xro.refund_order_id = #{refundOrderId}

View File

@ -141,10 +141,12 @@
<select id="info" parameterType="java.lang.Long" resultType="java.util.Map"> <select id="info" parameterType="java.lang.Long" resultType="java.util.Map">
select xro.refund_order_id refundOrderId ,xro.refund_order_number refundOrderNumber, select xro.refund_order_id refundOrderId ,xro.refund_order_number refundOrderNumber,
xro.alipay_number alipayNumber ,xro.prepay_id prepayid,xro.user_id userId,xro.amount, xro.alipay_number alipayNumber ,xro.prepay_id prepayid,xro.user_id userId,xro.amount,
xro.type,xro.examine_status examineStatus,xro.`status`,xro.create_time createTime,xau.phone,xdb.dict_value statusName xro.type,xro.examine_status examineStatus,xro.`status`,xro.create_time createTime,xau.phone,
sdd.dict_label statusName,sdds.dict_label examineStatusName
from xhpc_refund_order xro from xhpc_refund_order xro
LEFT JOIN xhpc_app_user xau on xau.app_user_id = xro.user_id LEFT JOIN xhpc_app_user xau on xau.app_user_id = xro.user_id
LEFT JOIN xhpc_dict_biz xdb on xdb.`code` = 'refund_order_status' and xdb.dict_key = xro.`status` LEFT JOIN sys_dict_data sdd on sdd.`dict_type` = 'refund_order_status' and sdd.dict_value = xro.`status`
LEFT JOIN sys_dict_data sdds on sdds.`dict_type` = 'refund_examine_status' and sdds.dict_value = xro.examine_status
where xro.del_flag = 0 and xro.refund_order_id = #{refundOrderId} where xro.del_flag = 0 and xro.refund_order_id = #{refundOrderId}
</select> </select>
@ -152,12 +154,12 @@
select xro.refund_order_id refundOrderId ,xro.refund_order_number refundOrderNumber, select xro.refund_order_id refundOrderId ,xro.refund_order_number refundOrderNumber,
xro.alipay_number alipayNumber ,xro.prepay_id prepayid,xro.user_id userId,xro.amount, xro.alipay_number alipayNumber ,xro.prepay_id prepayid,xro.user_id userId,xro.amount,
xro.type,xro.examine_status examineStatus,xro.`status`,xro.create_time createTime, xro.type,xro.examine_status examineStatus,xro.`status`,xro.create_time createTime,
xau.phone,xdb.dict_value statusName,xdbes.dict_value examineStatusName xau.phone,sdd.dict_label statusName,sdds.dict_label examineStatusName
from xhpc_refund_order xro from xhpc_refund_order xro
LEFT JOIN xhpc_app_user xau on xau.app_user_id = xro.user_id LEFT JOIN xhpc_app_user xau on xau.app_user_id = xro.user_id
LEFT JOIN xhpc_dict_biz xdb on xdb.`code` = 'refund_order_status' and xdb.dict_key = xro.`status` LEFT JOIN sys_dict_data sdd on sdd.`dict_type` = 'refund_order_status' and sdd.dict_value = xro.`status`
LEFT JOIN xhpc_dict_biz xdbes on xdbes.`code` = 'refund_examine_status' and xdbes.dict_key = LEFT JOIN sys_dict_data sdds on sdds.`dict_type` = 'refund_examine_status' and sdds.dict_value =
xro.`examine_status` xro.examine_status
where xro.del_flag = 0 where xro.del_flag = 0
<if test="phone != null and phone != ''"> <if test="phone != null and phone != ''">
and xau.phone like concat(concat('%', #{phone}), '%') and xau.phone like concat(concat('%', #{phone}), '%')

View File

@ -8,9 +8,11 @@
<result column="user_account_statement_id" property="userAccountStatementId"/> <result column="user_account_statement_id" property="userAccountStatementId"/>
<result column="user_id" property="userId"/> <result column="user_id" property="userId"/>
<result column="amount" property="amount"/> <result column="amount" property="amount"/>
<result column="remaining_sum" property="remainingSum"/>
<result column="charge_order_id" property="chargeOrderId"/> <result column="charge_order_id" property="chargeOrderId"/>
<result column="recharge_order_id" property="rechargeOrderId"/> <result column="recharge_order_id" property="rechargeOrderId"/>
<result column="refund_order_id" property="refundOrderId"/> <result column="refund_order_id" property="refundOrderId"/>
<result column="type" property="type"/>
<result column="status" property="status"/> <result column="status" property="status"/>
<result column="del_flag" property="delFlag"/> <result column="del_flag" property="delFlag"/>
<result column="create_time" property="createTime"/> <result column="create_time" property="createTime"/>
@ -30,6 +32,9 @@
<if test="null != amount and '' != amount"> <if test="null != amount and '' != amount">
amount, amount,
</if> </if>
<if test="null != remainingSum and '' != remainingSum">
remaining_sum,
</if>
<if test="null != chargeOrderId and '' != chargeOrderId"> <if test="null != chargeOrderId and '' != chargeOrderId">
charge_order_id, charge_order_id,
</if> </if>
@ -39,6 +44,9 @@
<if test="null != refundOrderId and '' != refundOrderId"> <if test="null != refundOrderId and '' != refundOrderId">
refund_order_id, refund_order_id,
</if> </if>
<if test="null != type and '' != type">
type,
</if>
<if test="null != status and '' != status"> <if test="null != status and '' != status">
status, status,
</if> </if>
@ -68,6 +76,9 @@
<if test="null != amount and '' != amount"> <if test="null != amount and '' != amount">
#{amount}, #{amount},
</if> </if>
<if test="null != remainingSum and '' != remainingSum">
#{remainingSum},
</if>
<if test="null != chargeOrderId and '' != chargeOrderId"> <if test="null != chargeOrderId and '' != chargeOrderId">
#{chargeOrderId}, #{chargeOrderId},
</if> </if>
@ -77,6 +88,9 @@
<if test="null != refundOrderId and '' != refundOrderId"> <if test="null != refundOrderId and '' != refundOrderId">
#{refundOrderId}, #{refundOrderId},
</if> </if>
<if test="null != type and '' != type">
#{type},
</if>
<if test="null != status and '' != status"> <if test="null != status and '' != status">
#{status}, #{status},
</if> </if>
@ -101,18 +115,37 @@
</trim> </trim>
</insert> </insert>
<select id="list" parameterType="java.lang.Long" resultType="java.util.Map"> <select id="page" parameterType="java.lang.Long" resultType="java.util.Map">
select xro.refund_order_id refundOrderId , select xuas.user_account_statement_id userAccountStatementId,xuas.user_id appUserId,xau.phone ,
xro.`status`,xdb.dict_value statusName, xuas.amount amount,xuas.remaining_sum remainingSum,xuas.create_time createTime,
xra.remark,xra.create_time createTime xuas.type, sdd.dict_label typeName
from xhpc_refund_audit xra from xhpc_user_account_statement xuas
LEFT JOIN xhpc_refund_order xro on xra.refund_order_id = xro.refund_order_id LEFT JOIN xhpc_app_user xau on xau.app_user_id = xuas.user_id
LEFT JOIN xhpc_dict_biz xdb on xdb.`code` = 'refund_order_status' and xdb.dict_key = xro.`status` LEFT JOIN sys_dict_data sdd on sdd.`dict_type` = 'account_statement_type' and sdd.dict_value = xuas.type
where xra.del_flag = 0 WHERE xuas.del_flag = 0
<if test="refundOrderId != null and refundOrderId != ''"> <if test="appUserId != null and appUserId != ''">
and xro.refund_order_id = #{refundOrderId} and xau.app_user_id = #{appUserId}
</if> </if>
ORDER BY xra.create_time DESC ORDER BY xuas.create_time DESC
</select> </select>
<select id="appUserInfo" parameterType="java.lang.Long" resultType="java.util.Map">
select app_user_id appUserId, phone, weixin_open_id weixinOpenId,
weixin_login weixinlogin,alipay_login alipayLogin,
alipay_open_id alipayOpenId, avatar, balance, password,
`status`,create_by createBy ,create_time createTime,
update_time updateTime, update_by updateBy,
del_flag delflag, remark,
CASE WHEN `status` = 0 THEN '正常' else '禁用' end statusName
from xhpc_app_user
WHERE del_flag = 0 and app_user_id = #{appUserId}
</select>
<update id="updateAppUserBalance" parameterType="com.xhpc.payment.domain.XhpcInternetUser">
UPDATE xhpc_app_user
<set>
<if test="null != balance">balance = #{balance},</if>
</set>
WHERE app_user_id = #{appUserId}
</update>
</mapper> </mapper>

View File

@ -135,7 +135,7 @@ public class XhpcAppUserController extends BaseController {
@PostMapping("/jscode2session") @PostMapping("/jscode2session")
@ApiOperation(value = "获取微信权限标识", notes = "jsCode") @ApiOperation(value = "获取微信权限标识", notes = "jsCode")
public Object jsCode(String jsCode, String encryptedData, String iv) { public Object jsCode(String jsCode, String encryptedData, String iv) {
if (null == jsCode) { if (StringUtils.isEmpty(jsCode)) {
return "信息不完整"; return "信息不完整";
} }
String url = environment.getProperty("WXGETJSCODE") + jsCode + "&grant_type=authorization_code"; String url = environment.getProperty("WXGETJSCODE") + jsCode + "&grant_type=authorization_code";

View File

@ -55,14 +55,14 @@ public class XhpcInternetUserController extends BaseController {
sysUser.setCreateBy(SecurityUtils.getUsername()); sysUser.setCreateBy(SecurityUtils.getUsername());
sysUser.setPassword(SecurityUtils.encryptPassword(xhpcInternetUser.getPhone())); sysUser.setPassword(SecurityUtils.encryptPassword(xhpcInternetUser.getPhone()));
AjaxResult ajaxResult = remoteSystemService.addUser(sysUser); AjaxResult ajaxResult = remoteSystemService.addUser(sysUser);
if (null != ajaxResult && !"200".equals(StringUtils.valueOf(ajaxResult.get("code")))) { if (StringUtils.isNotNull(ajaxResult) && !"200".equals(StringUtils.valueOf(ajaxResult.get("code")))) {
return ajaxResult; return ajaxResult;
} }
SysUser sysUser1 = iXhpcUserService.selectUserByUserName(sysUser.getUserName()); SysUser sysUser1 = iXhpcUserService.selectUserByUserName(sysUser.getUserName());
iXhpcInternetUserService.insert(xhpcInternetUser); iXhpcInternetUserService.insert(xhpcInternetUser);
sysUser1.setInternetUserId(xhpcInternetUser.getInternetUserId()); sysUser1.setInternetUserId(xhpcInternetUser.getInternetUserId());
ajaxResult = remoteSystemService.editUser(sysUser1); ajaxResult = remoteSystemService.editUser(sysUser1);
if (null != ajaxResult && !"200".equals(StringUtils.valueOf(ajaxResult.get("code")))) { if (StringUtils.isNotNull(ajaxResult) && !"200".equals(StringUtils.valueOf(ajaxResult.get("code")))) {
return ajaxResult; return ajaxResult;
} }
return AjaxResult.success(); return AjaxResult.success();
@ -89,7 +89,7 @@ public class XhpcInternetUserController extends BaseController {
sysUser.setCreateBy(SecurityUtils.getUsername()); sysUser.setCreateBy(SecurityUtils.getUsername());
sysUser.setPassword(SecurityUtils.encryptPassword(xhpcInternetUser.getPhone())); sysUser.setPassword(SecurityUtils.encryptPassword(xhpcInternetUser.getPhone()));
AjaxResult ajaxResult = remoteSystemService.editUser(sysUser); AjaxResult ajaxResult = remoteSystemService.editUser(sysUser);
if (null != ajaxResult && !"200".equals(StringUtils.valueOf(ajaxResult.get("code")))) { if (StringUtils.isNotNull(ajaxResult) && !"200".equals(StringUtils.valueOf(ajaxResult.get("code")))) {
return ajaxResult; return ajaxResult;
} }
return toAjax(iXhpcInternetUserService.update(xhpcInternetUser)); return toAjax(iXhpcInternetUserService.update(xhpcInternetUser));

View File

@ -60,7 +60,7 @@ public class XhpcOperatorController extends BaseController {
roleIds[0] = 3l; roleIds[0] = 3l;
sysUser.setRoleIds(roleIds); sysUser.setRoleIds(roleIds);
AjaxResult ajaxResult = remoteSystemService.addUser(sysUser); AjaxResult ajaxResult = remoteSystemService.addUser(sysUser);
if (null != ajaxResult && !"200".equals(StringUtils.valueOf(ajaxResult.get("code")))) { if (StringUtils.isNotNull(ajaxResult) && !"200".equals(StringUtils.valueOf(ajaxResult.get("code")))) {
return ajaxResult; return ajaxResult;
} }
if (UserConstants.NOT_UNIQUE.equals(iXhpcOperatorService.checkAccountUnique(xhpcOperator))) { if (UserConstants.NOT_UNIQUE.equals(iXhpcOperatorService.checkAccountUnique(xhpcOperator))) {
@ -70,7 +70,7 @@ public class XhpcOperatorController extends BaseController {
SysUser sysUser1 = iXhpcUserService.selectUserByUserName(sysUser.getUserName()); SysUser sysUser1 = iXhpcUserService.selectUserByUserName(sysUser.getUserName());
sysUser1.setOperatorId(xhpcOperator.getOperatorId()); sysUser1.setOperatorId(xhpcOperator.getOperatorId());
ajaxResult = remoteSystemService.editUser(sysUser1); ajaxResult = remoteSystemService.editUser(sysUser1);
if (null != ajaxResult && !"200".equals(StringUtils.valueOf(ajaxResult.get("code")))) { if (StringUtils.isNotNull(ajaxResult) && !"200".equals(StringUtils.valueOf(ajaxResult.get("code")))) {
return ajaxResult; return ajaxResult;
} }
return AjaxResult.success(); return AjaxResult.success();
@ -98,7 +98,7 @@ public class XhpcOperatorController extends BaseController {
sysUser.setCreateBy(SecurityUtils.getUsername()); sysUser.setCreateBy(SecurityUtils.getUsername());
sysUser.setPassword(SecurityUtils.encryptPassword(xhpcOperator.getPhone())); sysUser.setPassword(SecurityUtils.encryptPassword(xhpcOperator.getPhone()));
AjaxResult ajaxResult = remoteSystemService.editUser(sysUser); AjaxResult ajaxResult = remoteSystemService.editUser(sysUser);
if (null != ajaxResult && !"200".equals(StringUtils.valueOf(ajaxResult.get("code")))) { if (StringUtils.isNotNull(ajaxResult) && !"200".equals(StringUtils.valueOf(ajaxResult.get("code")))) {
return ajaxResult; return ajaxResult;
} }
if (UserConstants.NOT_UNIQUE.equals(iXhpcOperatorService.checkAccountUnique(xhpcOperator))) { if (UserConstants.NOT_UNIQUE.equals(iXhpcOperatorService.checkAccountUnique(xhpcOperator))) {

View File

@ -60,14 +60,14 @@ public class XhpcUserController extends BaseController {
sysUser.setUserType("00"); sysUser.setUserType("00");
sysUser.setCreateBy(SecurityUtils.getUsername()); sysUser.setCreateBy(SecurityUtils.getUsername());
AjaxResult ajaxResult = remoteSystemService.addUser(sysUser); AjaxResult ajaxResult = remoteSystemService.addUser(sysUser);
if (null != ajaxResult && !"200".equals(StringUtils.valueOf(ajaxResult.get("code")))) { if (StringUtils.isNotNull(ajaxResult) && !"200".equals(StringUtils.valueOf(ajaxResult.get("code")))) {
return ajaxResult; return ajaxResult;
} }
SysRole role = new SysRole(); SysRole role = new SysRole();
role.setRoleName(sysUser.getUserName()); role.setRoleName(sysUser.getUserName());
role.setRoleKey(sysUser.getUserName()); role.setRoleKey(sysUser.getUserName());
ajaxResult = remoteSystemService.addRole(role); ajaxResult = remoteSystemService.addRole(role);
if (null != ajaxResult && !"200".equals(StringUtils.valueOf(ajaxResult.get("code")))) { if (StringUtils.isNotNull(ajaxResult) && !"200".equals(StringUtils.valueOf(ajaxResult.get("code")))) {
return ajaxResult; return ajaxResult;
} }
return AjaxResult.success(); return AjaxResult.success();
@ -84,7 +84,7 @@ public class XhpcUserController extends BaseController {
return AjaxResult.error("用户id不能为空"); return AjaxResult.error("用户id不能为空");
} }
AjaxResult ajaxResult = remoteSystemService.editUser(sysUser); AjaxResult ajaxResult = remoteSystemService.editUser(sysUser);
if (null != ajaxResult && !"200".equals(StringUtils.valueOf(ajaxResult.get("code")))) { if (StringUtils.isNotNull(ajaxResult) && !"200".equals(StringUtils.valueOf(ajaxResult.get("code")))) {
return ajaxResult; return ajaxResult;
} }
return AjaxResult.success(); return AjaxResult.success();
@ -129,14 +129,14 @@ public class XhpcUserController extends BaseController {
sysUser.setUserType("03"); sysUser.setUserType("03");
sysUser.setCreateBy(SecurityUtils.getUsername()); sysUser.setCreateBy(SecurityUtils.getUsername());
AjaxResult ajaxResult = remoteSystemService.addUser(sysUser); AjaxResult ajaxResult = remoteSystemService.addUser(sysUser);
if (null != ajaxResult && !"200".equals(StringUtils.valueOf(ajaxResult.get("code")))) { if (StringUtils.isNotNull(ajaxResult) && !"200".equals(StringUtils.valueOf(ajaxResult.get("code")))) {
return ajaxResult; return ajaxResult;
} }
SysRole role = new SysRole(); SysRole role = new SysRole();
role.setRoleName(sysUser.getUserName()); role.setRoleName(sysUser.getUserName());
role.setRoleKey(sysUser.getUserName()); role.setRoleKey(sysUser.getUserName());
ajaxResult = remoteSystemService.addRole(role); ajaxResult = remoteSystemService.addRole(role);
if (null != ajaxResult && !"200".equals(StringUtils.valueOf(ajaxResult.get("code")))) { if (StringUtils.isNotNull(ajaxResult) && !"200".equals(StringUtils.valueOf(ajaxResult.get("code")))) {
return ajaxResult; return ajaxResult;
} }
return AjaxResult.success(); return AjaxResult.success();
@ -156,7 +156,7 @@ public class XhpcUserController extends BaseController {
return AjaxResult.error("所属运营上不能为空"); return AjaxResult.error("所属运营上不能为空");
} }
AjaxResult ajaxResult = remoteSystemService.editUser(sysUser); AjaxResult ajaxResult = remoteSystemService.editUser(sysUser);
if (null != ajaxResult && !"200".equals(StringUtils.valueOf(ajaxResult.get("code")))) { if (StringUtils.isNotNull(ajaxResult) && !"200".equals(StringUtils.valueOf(ajaxResult.get("code")))) {
return ajaxResult; return ajaxResult;
} }
return AjaxResult.success(); return AjaxResult.success();

View File

@ -5,6 +5,7 @@ import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
@ -75,7 +76,7 @@ public class XhpcInternetUser extends BaseEntity {
/** /**
* 余额 * 余额
*/ */
private Double money; private BigDecimal balance;
/** /**
* 地址code * 地址code
@ -203,12 +204,12 @@ public class XhpcInternetUser extends BaseEntity {
this.cooperationEndTime = cooperationEndTime; this.cooperationEndTime = cooperationEndTime;
} }
public Double getMoney() { public BigDecimal getBalance() {
return money; return balance;
} }
public void setMoney(Double money) { public void setBalance(BigDecimal balance) {
this.money = money; this.balance = balance;
} }
public Integer getAreaCode() { public Integer getAreaCode() {

View File

@ -32,6 +32,6 @@ WXGETJSCODE: "https://api.weixin.qq.com/sns/jscode2session?appid=wxd0a48e00319ef
#支付宝公钥 #支付宝公钥
ALIPAYPUBLICKEY: "MIIBIjANBgkqhkiG9w0BAQ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SW1GvCaaSCqu4wZiVhHYclkHbdtl5xpMbUvwDtEMlHI/gvvEs+XDoFVa8zUPXgBsO00vKNAkSqoeE+7lUaQTG8rTtX9lFiJDkX0v9NHzeyVzZi8ZxkpT6GFV2eDRa/+XGht7KdRoiSpvvvEK0QslfQKBgQDsWhWcz0WcpjjsbtrsSoutX2lR180g/2VpKU4Od4OSMYI03DhpCevembgclFSbRpsIvaqIbCeZEcidkaGcjIJ7N8ZVJF/lEEWzUNKAJ1WRozmptXQIXA2E3IZGQPZai8Hm0C+idy0DrXdPPs7JX9EcDN8m40M7DYAS9REyB+5sqQKBgQDnwOFaOZ3Tdzu/dAgEXzky/p3Y05yBDVQkHhLdJsAfFaVcBgRuP+/eYSDtwt0FF1XRP4hugQ0qpKTLm7kUuoBItBbTLyWZmduCrn7nHTT/zTAWUJNkEZNOfR+DFTiwpIj7ZCRMxJbB6PwDC+1lxcfEIdxqiU2dxgzRWskHpTr3/QKBgB3HJ8vu7WVUJ/3Z5ak5pyl7yOgv2T9cDinWs2ftNN15cV85k73gKyCLm3+2TIaXuba7Nr4jakXF0NHRZFw188aUe1+EyrQwfaee+jZ9PjGwL/aqzuiyuF1R73TwgFleHFr5RdchTsGU3GBWmHUUpmLzWDYtEe5hwA4jZDw6dZapAoGBAKsr9GImz8vsKjfzQJMj8OC18ch+U29nwkhjHPnjtE4Zjf7izUC2x8b1EWa59pqXIPv9Kgb2aP2MX/fQHtUwNaRza9vfbRcG4qaATKWNIsV2BR+yI/SP7Hdt7fNfv1Jbivj42zj0HyTNXA7E4GPiZpKMYaXt56JouyoRbBnMoakO"
#支付宝appid #支付宝appid
ALIPAYAPPID: "2021002156615717" ALIPAYAPPID: "2021002156615717"

View File

@ -14,7 +14,7 @@
<result column="card_number" property="cardNumber"/> <result column="card_number" property="cardNumber"/>
<result column="cooperation_start_time" property="cooperationStartTime" jdbcType="TIMESTAMP"/> <result column="cooperation_start_time" property="cooperationStartTime" jdbcType="TIMESTAMP"/>
<result column="cooperation_end_time" property="cooperationEndTime" jdbcType="TIMESTAMP"/> <result column="cooperation_end_time" property="cooperationEndTime" jdbcType="TIMESTAMP"/>
<result column="money" property="money"/> <result column="balance" property="balance"/>
<result column="area_code" property="areaCode"/> <result column="area_code" property="areaCode"/>
<result column="address" property="address"/> <result column="address" property="address"/>
<result column="detailed_address" property="detailedAddress"/> <result column="detailed_address" property="detailedAddress"/>
@ -61,8 +61,8 @@
<if test="null != cooperationEndTime "> <if test="null != cooperationEndTime ">
cooperation_end_time, cooperation_end_time,
</if> </if>
<if test="null != money and '' != money"> <if test="null != balance and '' != balance">
money, balance,
</if> </if>
<if test="null != areaCode and '' != areaCode"> <if test="null != areaCode and '' != areaCode">
area_code, area_code,
@ -132,8 +132,8 @@
<if test="null != cooperationEndTime "> <if test="null != cooperationEndTime ">
#{cooperationEndTime}, #{cooperationEndTime},
</if> </if>
<if test="null != money and '' != money"> <if test="null != balance and '' != balance">
#{money}, #{balance},
</if> </if>
<if test="null != areaCode and '' != areaCode"> <if test="null != areaCode and '' != areaCode">
#{areaCode}, #{areaCode},
@ -195,7 +195,7 @@
<if test="null != cooperationEndTime">cooperation_end_time = <if test="null != cooperationEndTime">cooperation_end_time =
#{cooperationEndTime}, #{cooperationEndTime},
</if> </if>
<if test="null != money and '' != money">money = #{money},</if> <if test="null != balance and '' != balance">balance = #{balance},</if>
<if test="null != areaCode and '' != areaCode">area_code = #{areaCode},</if> <if test="null != areaCode and '' != areaCode">area_code = #{areaCode},</if>
<if test="null != address and '' != address">address = #{address},</if> <if test="null != address and '' != address">address = #{address},</if>
<if test="null != detailedAddress and '' != detailedAddress">detailed_address = #{detailedAddress},</if> <if test="null != detailedAddress and '' != detailedAddress">detailed_address = #{detailedAddress},</if>
@ -226,7 +226,7 @@
xiu.internet_user_id internetUserId, xiu.`name`, xiu.phone, xiu.contact_name contactName, xiu.internet_user_id internetUserId, xiu.`name`, xiu.phone, xiu.contact_name contactName,
xiu.contact_phone contactPhone, xiu.open_bank openBank, xiu.card_number cardNumber, xiu.contact_phone contactPhone, xiu.open_bank openBank, xiu.card_number cardNumber,
xiu.cooperation_start_time cooperationStartTime, xiu.cooperation_end_time cooperationEndTime, xiu.cooperation_start_time cooperationStartTime, xiu.cooperation_end_time cooperationEndTime,
xiu.money, xiu.area_code areaCode, xiu.address, xiu.detailed_address detailedAddress, xiu.balance, xiu.area_code areaCode, xiu.address, xiu.detailed_address detailedAddress,
xiu.commission_type commissionType, xiu.commission_rate commissionRate, xiu.commission_type commissionType, xiu.commission_rate commissionRate,
xiu.longitude, xiu.latitude, xiu.`status`, xiu.longitude, xiu.latitude, xiu.`status`,
xiu.create_by createBy ,xiu.create_time createTime, xiu.create_by createBy ,xiu.create_time createTime,