后台更改相关
This commit is contained in:
parent
f64486d7a6
commit
9108f3c914
|
|
@ -4,11 +4,9 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.chaozhanggui.admin.system.service.DeviceStockService;
|
import com.chaozhanggui.admin.system.service.DeviceStockService;
|
||||||
import com.chaozhanggui.common.system.config.RespBody;
|
import com.chaozhanggui.common.system.config.RespBody;
|
||||||
import com.chaozhanggui.dao.system.dao.TbPlussDeviceStockMapper;
|
import com.chaozhanggui.dao.system.dao.TbPlussDeviceStockMapper;
|
||||||
|
import com.chaozhanggui.dao.system.entity.DTO.DeviceStockDTO;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.web.bind.annotation.CrossOrigin;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
|
@ -24,8 +22,10 @@ public class DeviceStockController {
|
||||||
@Resource
|
@Resource
|
||||||
private DeviceStockService deviceStockService;
|
private DeviceStockService deviceStockService;
|
||||||
|
|
||||||
// @GetMapping("pageData")
|
@GetMapping("/pageData")
|
||||||
// public RespBody pageData(){
|
public RespBody pageData(@RequestParam Integer currPage, @RequestParam Integer size, DeviceStockDTO dto){
|
||||||
//
|
return deviceStockService.pageData(currPage, size, dto);
|
||||||
// }
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,12 @@
|
||||||
package com.chaozhanggui.admin.system.controller;
|
package com.chaozhanggui.admin.system.controller;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import com.chaozhanggui.admin.system.annotation.OpLog;
|
import com.chaozhanggui.admin.system.annotation.OpLog;
|
||||||
import com.chaozhanggui.admin.system.service.AccountService;
|
import com.chaozhanggui.admin.system.service.AccountService;
|
||||||
import com.chaozhanggui.admin.system.service.MerchantInfoService;
|
import com.chaozhanggui.admin.system.service.MerchantInfoService;
|
||||||
|
import com.chaozhanggui.common.system.config.MsgException;
|
||||||
import com.chaozhanggui.merchant.service.sxf.SxfMccInfoService;
|
import com.chaozhanggui.merchant.service.sxf.SxfMccInfoService;
|
||||||
import com.chaozhanggui.common.system.config.RespBody;
|
import com.chaozhanggui.common.system.config.RespBody;
|
||||||
import com.chaozhanggui.dao.system.dao.TbPlussBankCodeSxfMapper;
|
import com.chaozhanggui.dao.system.dao.TbPlussBankCodeSxfMapper;
|
||||||
|
|
@ -216,4 +219,19 @@ public class MerchantInfoController {
|
||||||
public RespBody connectInfo(@PathVariable("userId") Integer userId) {
|
public RespBody connectInfo(@PathVariable("userId") Integer userId) {
|
||||||
return merchantInfoService.connectInfo(userId);
|
return merchantInfoService.connectInfo(userId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 清理进件驳回信息中的通道数据
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PostMapping("/clearRejectedChannel")
|
||||||
|
public RespBody clearRejectedChannel(@RequestBody String merchantCode) {
|
||||||
|
return merchantInfoService.clearRejectedChannel(merchantCode);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/createNewAuditData")
|
||||||
|
public RespBody createNewAuditData(@RequestBody String merchantCode) {
|
||||||
|
return merchantInfoService.createNewAuditData(merchantCode);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,6 @@ public class AdminWebConfig implements WebMvcConfigurer {
|
||||||
registry.addInterceptor(new LoginInterceptor(redisUtil))
|
registry.addInterceptor(new LoginInterceptor(redisUtil))
|
||||||
.addPathPatterns()
|
.addPathPatterns()
|
||||||
// 如果有静态资源的时候可以在这个地方放行
|
// 如果有静态资源的时候可以在这个地方放行
|
||||||
.excludePathPatterns("/","/user/doLogin","/agency/mytest","/agency/queryAgency","/promotion/testRequest","/promotion/testRequestBoolean","/agency/sendmessage");
|
.excludePathPatterns("/","/user/doLogin","/agency/mytest","/agency/queryAgency","/promotion/testRequest","/promotion/testRequestBoolean","/agency/sendmessage","/Alipay/pay");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,25 @@
|
||||||
package com.chaozhanggui.admin.system.service;
|
package com.chaozhanggui.admin.system.service;
|
||||||
|
|
||||||
|
import com.chaozhanggui.common.system.config.RespBody;
|
||||||
|
import com.chaozhanggui.dao.system.dao.TbPlussDeviceSpecMapper;
|
||||||
|
import com.chaozhanggui.dao.system.dao.TbPlussDeviceStockGroupMapper;
|
||||||
|
import com.chaozhanggui.dao.system.dao.TbPlussDeviceStockMapper;
|
||||||
|
import com.chaozhanggui.dao.system.dao.TbPlussDeviceTypeMapper;
|
||||||
|
import com.chaozhanggui.dao.system.entity.DTO.DeviceStockDTO;
|
||||||
|
import com.chaozhanggui.dao.system.entity.TbPlussDeviceSpec;
|
||||||
|
import com.chaozhanggui.dao.system.entity.TbPlussDeviceStockGroup;
|
||||||
|
import com.chaozhanggui.dao.system.entity.TbPlussDeviceType;
|
||||||
|
import com.chaozhanggui.dao.system.entity.VO.DeviceStockVO;
|
||||||
|
import com.github.pagehelper.PageHelper;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 库存管理
|
* 库存管理
|
||||||
|
|
@ -8,4 +27,67 @@ import org.springframework.stereotype.Service;
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class DeviceStockService {
|
public class DeviceStockService {
|
||||||
|
@Resource
|
||||||
|
private TbPlussDeviceStockMapper deviceStockMapper;
|
||||||
|
@Resource
|
||||||
|
private TbPlussDeviceStockGroupMapper deviceStockGroupMapper;
|
||||||
|
@Resource
|
||||||
|
private TbPlussDeviceTypeMapper deviceTypeMapper;
|
||||||
|
@Resource
|
||||||
|
private TbPlussDeviceSpecMapper deviceSpecMapper;
|
||||||
|
|
||||||
|
|
||||||
|
public RespBody pageData(Integer pageNum,Integer pageSize, DeviceStockDTO dto){
|
||||||
|
PageHelper.startPage(pageNum, pageSize);
|
||||||
|
|
||||||
|
if (Objects.equals(dto.getDeviceno(), "")) {
|
||||||
|
dto.setDeviceno(null);
|
||||||
|
}
|
||||||
|
if(StringUtils.isEmpty(dto.getBindStatus())){
|
||||||
|
dto.setBindStatus("-2");
|
||||||
|
}
|
||||||
|
if(StringUtils.isNotEmpty(dto.getNoType())){
|
||||||
|
if("2".equals(dto.getNoType())){
|
||||||
|
if(StringUtils.isNotEmpty(dto.getStartDeviceNo())){
|
||||||
|
dto.setStartSnNo(dto.getStartDeviceNo());
|
||||||
|
dto.setStartDeviceNo(null);
|
||||||
|
}
|
||||||
|
if(StringUtils.isNotEmpty(dto.getEndDeviceNo())){
|
||||||
|
dto.setEndSnNo(dto.getEndDeviceNo());
|
||||||
|
dto.setEndDeviceNo(null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
List<DeviceStockVO> deviceStockVOS = deviceStockMapper.selectPageInfo(dto);
|
||||||
|
//组装
|
||||||
|
List<DeviceStockVO> resultList = new ArrayList<>();
|
||||||
|
|
||||||
|
List<TbPlussDeviceStockGroup> deviceStockGroupList = deviceStockGroupMapper.selectAll();
|
||||||
|
List<TbPlussDeviceType> deviceTypeList = deviceTypeMapper.selectAll();
|
||||||
|
List<TbPlussDeviceSpec> deviceSpecList = deviceSpecMapper.selectAll();
|
||||||
|
|
||||||
|
for (DeviceStockVO item : deviceStockVOS) {
|
||||||
|
for (TbPlussDeviceStockGroup deviceStockGroup : deviceStockGroupList) {
|
||||||
|
if (deviceStockGroup.getGroupcode().equals(item.getGroupno())) {
|
||||||
|
item.setGroupNoDesc(deviceStockGroup.getGroupname());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (TbPlussDeviceType deviceType : deviceTypeList) {
|
||||||
|
if (deviceType.getCode().equals(item.getCode())) {
|
||||||
|
item.setCodeDesc(deviceType.getName());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (TbPlussDeviceSpec deviceSpec : deviceSpecList) {
|
||||||
|
if (deviceSpec.getCode().equals(item.getCode()) && deviceSpec.getSpec().equals(item.getType())) {
|
||||||
|
item.setTypeDesc(deviceSpec.getSpecname());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
resultList.add(item);
|
||||||
|
}
|
||||||
|
|
||||||
|
return new RespBody("000000",resultList);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ package com.chaozhanggui.admin.system.service;
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import com.chaozhanggui.common.system.config.MsgException;
|
import com.chaozhanggui.common.system.config.MsgException;
|
||||||
|
|
@ -435,5 +436,30 @@ public class MerchantInfoService {
|
||||||
return new RespBody("000000");
|
return new RespBody("000000");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public RespBody clearRejectedChannel(String merchantCode){
|
||||||
|
// 只能清理审核驳回,以及待后台审核状态下的进件记录通道信息
|
||||||
|
merchantChannelStatusMapper.updateByClearChannel(merchantCode);
|
||||||
|
return new RespBody("000000");
|
||||||
|
}
|
||||||
|
|
||||||
|
public RespBody createNewAuditData(String merchantCode){
|
||||||
|
|
||||||
|
TbPlussMerchantChannelStatus byMerchantCodeAndStatus = merchantChannelStatusMapper.getByMerchantCodeAndStatus(merchantCode);
|
||||||
|
MsgException.checkNonNull(byMerchantCodeAndStatus, "当前已存在待审核信息");
|
||||||
|
|
||||||
|
TbPlussMerchantChannelStatus byMerchantCodeAndChannel = merchantChannelStatusMapper.getByMerchantCodeAndChannel(merchantCode);
|
||||||
|
MsgException.checkNonNull(byMerchantCodeAndChannel, "当前D1通道存在未完成进件数据");
|
||||||
|
|
||||||
|
Integer countByMerchantCode = merchantChannelStatusMapper.getCountByMerchantCode(merchantCode);
|
||||||
|
MsgException.check(countByMerchantCode >= 2, "当前已进件两个通道");
|
||||||
|
|
||||||
|
TbPlussMerchantChannelStatus mcs = new TbPlussMerchantChannelStatus();
|
||||||
|
mcs.setMerchantcode(merchantCode);
|
||||||
|
mcs.setStatus(TbPlussMerchantChannelStatus.AUDIT_STATUS_EXAMINING);
|
||||||
|
mcs.setThirdstatus(TbPlussMerchantChannelStatus.AUDIT_THIRD_STATUS_WAITING);
|
||||||
|
merchantChannelStatusMapper.updateByPrimaryKeySelective(mcs);
|
||||||
|
|
||||||
|
return new RespBody("000000");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ spring:
|
||||||
datasource:
|
datasource:
|
||||||
url: jdbc:mysql://101.37.12.135:3306/ysk_test?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useJDBCCompliantTimezoneShift=true&serverTimezone=CTT&useSSL=false
|
url: jdbc:mysql://101.37.12.135:3306/ysk_test?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useJDBCCompliantTimezoneShift=true&serverTimezone=CTT&useSSL=false
|
||||||
username: ysk_test
|
username: ysk_test
|
||||||
password: CZGmysqlroot@123
|
password: mysqlroot@123
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
initialSize: 5
|
initialSize: 5
|
||||||
minIdle: 5
|
minIdle: 5
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ spring:
|
||||||
datasource:
|
datasource:
|
||||||
url: jdbc:mysql://127.0.0.1:3306/ysk_test?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useJDBCCompliantTimezoneShift=true&serverTimezone=CTT&useSSL=false
|
url: jdbc:mysql://127.0.0.1:3306/ysk_test?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useJDBCCompliantTimezoneShift=true&serverTimezone=CTT&useSSL=false
|
||||||
username: ysk_test
|
username: ysk_test
|
||||||
password: CZGmysqlroot@123
|
password: mysqlroot@123
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
initialSize: 5
|
initialSize: 5
|
||||||
minIdle: 5
|
minIdle: 5
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ server:
|
||||||
# 指定日志级别 把springboot的所有日志修改成为debug
|
# 指定日志级别 把springboot的所有日志修改成为debug
|
||||||
logging:
|
logging:
|
||||||
level:
|
level:
|
||||||
root: debug
|
root: info
|
||||||
mybatis:
|
mybatis:
|
||||||
configuration:
|
configuration:
|
||||||
map-underscore-to-camel-case: true
|
map-underscore-to-camel-case: true
|
||||||
|
|
@ -32,6 +32,10 @@ alipay-config:
|
||||||
alipayCertPublicKeyPath: /home/www/service/key/alipayCertPublicKey_RSA2.crt
|
alipayCertPublicKeyPath: /home/www/service/key/alipayCertPublicKey_RSA2.crt
|
||||||
alipayRootCertPath: /home/www/service/key/alipayRootCert.crt
|
alipayRootCertPath: /home/www/service/key/alipayRootCert.crt
|
||||||
|
|
||||||
|
alipayWebAppId: 2021003175619219
|
||||||
|
privateKeyWeb: MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCInywsrhhiSNj7jjOB4/zL79pAaLzoYOuOqHeQELxgXrVFmpqJ7y76wniu4nrHKfp4jQVIHw4+IkBsTNwABTPiryVzAQ4ydb/opzn4zblWRB4S7mAgnc2wqO4FMcwSOiHh7uPFAqvB8oZmEizlbXIJSiDFd3rqG2l8ZADjwuwM0nue1fUJLu65d2B6NDFgBIa11enkrNyX9uPiaeIFW62lvTN1W2AUqTJLvfko5ejExGUDkie6g5W5MIvUSKfq7sDkpt5IoQCooBzjJJ/Ckfw/rJlqoPDFzUSiANBABwu0jAJ42MGYdJ8+dyDDUNla20xmMjXbRtUe5roVzJrrgMjFAgMBAAECggEAPKPx9o77sbxF2zod8JxiW57Fj+stVjOWuoZaM27KPjgrW46o42pvvsvMx0stVfNzAkkNvBpUtw167Nccm0Gz6vz0sVwZkhojqT94gs/FYN3xP1PhBPkmEDCbHWEiBEEbQu5G2O47kGV2dB3DIb53bFoju6Ixw3GRW64DmxSss2+ZsErAWPBwbxIbUDGzIxtGhuWrvWX6pSnnvs+PNNqyoisXnh4cDjrmS9qSgsgcL4D0HwNGTsG1uBeLx4g3D2vKKqhP1osEly91P0QAGzcpuvKqeJ2ZwfFMDlabeOyqRQxFW/FLT2DuY1KmBhcGx6tjDMo7EEpVJ7NHcSHYfAa6wQKBgQDzZbIAV7shEiwS6ZwLSbeMvJkWELJtmEGk/qI/01tULHmrwDh8FIjbrHZrQNXruZ+dS+RObahCKywjYVEr/g15v5vv4yA20bmUgmO27/mVj6mpwvoHYBn0H/511a6V7lopFlCA735K+liFZ6ZW+qZxV8gkZ3/ZZDUy1LSArQmg8QKBgQCPsiK+mUdvs+1ReDm09RessbastXgYvj6UWIsPHc4Mxx/6R8qgy9nt2n2u95cK2uONtpNWswpDtOeWVakuHSKHbdG7Xz0DlklHuzin2JhOBwBu36HAVDjWPF+JDcVkUz7hFWFwl0DawRijFBcr0OV6GUoUURB21xtRnrQPmK/lFQKBgHPWFE7hceedVGhz0ZX1sWtDXsAHlkNeUO+LWAB0QGTg/c7lnnw+8ZtKitkkdCrJntMniTJiMc+76De2WwFK2XL14+rY9z3ftiidnYM01l19j8uBRak47WEn0NyXo40rcLFZM1sJn9tjJbnnyFxg0dHjaxcYQtpdPIxCet06fPihAoGAfaqJ3CnsYXH3H4KG5Qxa8fpRCWWCbBEkZVOx+TxVkLMr8hOKz2i3Y93qgHOisimPS8XZwL6/QUsaJU0wsVVldw7Blp3JnDN4TrUa7R7sw4A4Dr6glLSTKDiQTCmw8PYkTXAHURHV8/le9G+DfBwqM8eeE3p5bZTdHVovmlwrp6kCgYEA7uTSOa0phZ7ts++FVdEZf9TI/B4tRuP4aT31BHs9UoCW1g01/NEEBDiHV9udq9B6Cd5onq+QFj4jiwakTNzXjhQZqgmag1TBE9VpahLxYAD5pYn/Tvm8l5vWuSKcOSwQb2lDg5R2/bmCJRV/QHRkdkAAhHGC/TrOskUCRgosUac=
|
||||||
|
PublicKeyWeb: MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAiJ8sLK4YYkjY+44zgeP8y+/aQGi86GDrjqh3kBC8YF61RZqaie8u+sJ4ruJ6xyn6eI0FSB8OPiJAbEzcAAUz4q8lcwEOMnW/6Kc5+M25VkQeEu5gIJ3NsKjuBTHMEjoh4e7jxQKrwfKGZhIs5W1yCUogxXd66htpfGQA48LsDNJ7ntX1CS7uuXdgejQxYASGtdXp5Kzcl/bj4mniBVutpb0zdVtgFKkyS735KOXoxMRlA5InuoOVuTCL1Ein6u7A5KbeSKEAqKAc4ySfwpH8P6yZaqDwxc1EogDQQAcLtIwCeNjBmHSfPncgw1DZWttMZjI120bVHua6Fcya64DIxQIDAQAB
|
||||||
|
|
||||||
|
|
||||||
parameter:
|
parameter:
|
||||||
ZY_ALI_APP_ID: 2021003175619219
|
ZY_ALI_APP_ID: 2021003175619219
|
||||||
|
|
|
||||||
|
|
@ -33,4 +33,17 @@ public class AliPayConfig implements Serializable {
|
||||||
* 阿里根证书路径
|
* 阿里根证书路径
|
||||||
*/
|
*/
|
||||||
private String alipayRootCertPath;
|
private String alipayRootCertPath;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 支付宝网页支付AppID
|
||||||
|
*/
|
||||||
|
private String alipayWebAppId;
|
||||||
|
/**
|
||||||
|
* 支付宝网页支付私钥
|
||||||
|
*/
|
||||||
|
private String privateKeyWeb;
|
||||||
|
/**
|
||||||
|
* 支付宝网页支付公钥
|
||||||
|
*/
|
||||||
|
private String PublicKeyWeb;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
package com.chaozhanggui.system.service;
|
package com.chaozhanggui.system.service;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.alipay.api.AlipayApiException;
|
import com.alipay.api.AlipayApiException;
|
||||||
import com.alipay.api.AlipayClient;
|
import com.alipay.api.AlipayClient;
|
||||||
import com.alipay.api.CertAlipayRequest;
|
import com.alipay.api.CertAlipayRequest;
|
||||||
|
|
@ -7,7 +8,9 @@ import com.alipay.api.DefaultAlipayClient;
|
||||||
import com.alipay.api.domain.AlipayFundTransUniTransferModel;
|
import com.alipay.api.domain.AlipayFundTransUniTransferModel;
|
||||||
import com.alipay.api.domain.Participant;
|
import com.alipay.api.domain.Participant;
|
||||||
import com.alipay.api.request.AlipayFundTransUniTransferRequest;
|
import com.alipay.api.request.AlipayFundTransUniTransferRequest;
|
||||||
|
import com.alipay.api.request.AlipayTradePagePayRequest;
|
||||||
import com.alipay.api.response.AlipayFundTransUniTransferResponse;
|
import com.alipay.api.response.AlipayFundTransUniTransferResponse;
|
||||||
|
import com.alipay.api.response.AlipayTradePagePayResponse;
|
||||||
import com.chaozhanggui.system.config.AliPayConfig;
|
import com.chaozhanggui.system.config.AliPayConfig;
|
||||||
import org.springframework.boot.autoconfigure.domain.EntityScan;
|
import org.springframework.boot.autoconfigure.domain.EntityScan;
|
||||||
import org.springframework.context.annotation.ComponentScan;
|
import org.springframework.context.annotation.ComponentScan;
|
||||||
|
|
@ -15,6 +18,8 @@ import org.springframework.context.annotation.Configuration;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author lyf
|
* @author lyf
|
||||||
|
|
@ -60,5 +65,83 @@ public class AliPayService {
|
||||||
AlipayFundTransUniTransferResponse response = alipayClient.certificateExecute(request);
|
AlipayFundTransUniTransferResponse response = alipayClient.certificateExecute(request);
|
||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
public String alipayWeb(double totalAmount,String subject) throws AlipayApiException {
|
||||||
|
AlipayClient alipayClient = new DefaultAlipayClient("https://openapi.alipay.com/gateway.do", aliPayConfig.getAlipayWebAppId(),
|
||||||
|
aliPayConfig.getPrivateKeyWeb(),"json","GBK",aliPayConfig.getPublicKeyWeb(),"RSA2");
|
||||||
|
AlipayTradePagePayRequest request = new AlipayTradePagePayRequest();
|
||||||
|
//异步接收地址,仅支持http/https,公网可访问
|
||||||
|
request.setNotifyUrl("");
|
||||||
|
//同步跳转地址,仅支持http/https
|
||||||
|
request.setReturnUrl("http://point.sxczgkj.cn/");
|
||||||
|
|
||||||
|
JSONObject bizContent = new JSONObject();
|
||||||
|
//商户订单号,商家自定义,保持唯一性
|
||||||
|
bizContent.put("out_trade_no", UUID.randomUUID().toString());
|
||||||
|
//支付金额,最小值0.01元
|
||||||
|
bizContent.put("total_amount", totalAmount);
|
||||||
|
//订单标题,不可使用特殊符号
|
||||||
|
bizContent.put("subject", subject);
|
||||||
|
//电脑网站支付场景固定传值FAST_INSTANT_TRADE_PAY
|
||||||
|
bizContent.put("product_code", "FAST_INSTANT_TRADE_PAY");
|
||||||
|
|
||||||
|
request.setBizContent(bizContent.toString());
|
||||||
|
AlipayTradePagePayResponse response = alipayClient.pageExecute(request);
|
||||||
|
if(response.isSuccess()){
|
||||||
|
System.out.println("调用成功");
|
||||||
|
} else {
|
||||||
|
System.out.println("调用失败");
|
||||||
|
}
|
||||||
|
return response.getBody();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static void main(String[] args) throws AlipayApiException {
|
||||||
|
AlipayClient alipayClient = new DefaultAlipayClient("https://openapi.alipay.com/gateway.do",
|
||||||
|
"2021003175619219",
|
||||||
|
"MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCInywsrhhiSNj7jjOB4/zL79pAaLzoYOuOqHeQELxgXrVFmpqJ7y76wniu4nrHKfp4jQVIHw4+IkBsTNwABTPiryVzAQ4ydb/opzn4zblWRB4S7mAgnc2wqO4FMcwSOiHh7uPFAqvB8oZmEizlbXIJSiDFd3rqG2l8ZADjwuwM0nue1fUJLu65d2B6NDFgBIa11enkrNyX9uPiaeIFW62lvTN1W2AUqTJLvfko5ejExGUDkie6g5W5MIvUSKfq7sDkpt5IoQCooBzjJJ/Ckfw/rJlqoPDFzUSiANBABwu0jAJ42MGYdJ8+dyDDUNla20xmMjXbRtUe5roVzJrrgMjFAgMBAAECggEAPKPx9o77sbxF2zod8JxiW57Fj+stVjOWuoZaM27KPjgrW46o42pvvsvMx0stVfNzAkkNvBpUtw167Nccm0Gz6vz0sVwZkhojqT94gs/FYN3xP1PhBPkmEDCbHWEiBEEbQu5G2O47kGV2dB3DIb53bFoju6Ixw3GRW64DmxSss2+ZsErAWPBwbxIbUDGzIxtGhuWrvWX6pSnnvs+PNNqyoisXnh4cDjrmS9qSgsgcL4D0HwNGTsG1uBeLx4g3D2vKKqhP1osEly91P0QAGzcpuvKqeJ2ZwfFMDlabeOyqRQxFW/FLT2DuY1KmBhcGx6tjDMo7EEpVJ7NHcSHYfAa6wQKBgQDzZbIAV7shEiwS6ZwLSbeMvJkWELJtmEGk/qI/01tULHmrwDh8FIjbrHZrQNXruZ+dS+RObahCKywjYVEr/g15v5vv4yA20bmUgmO27/mVj6mpwvoHYBn0H/511a6V7lopFlCA735K+liFZ6ZW+qZxV8gkZ3/ZZDUy1LSArQmg8QKBgQCPsiK+mUdvs+1ReDm09RessbastXgYvj6UWIsPHc4Mxx/6R8qgy9nt2n2u95cK2uONtpNWswpDtOeWVakuHSKHbdG7Xz0DlklHuzin2JhOBwBu36HAVDjWPF+JDcVkUz7hFWFwl0DawRijFBcr0OV6GUoUURB21xtRnrQPmK/lFQKBgHPWFE7hceedVGhz0ZX1sWtDXsAHlkNeUO+LWAB0QGTg/c7lnnw+8ZtKitkkdCrJntMniTJiMc+76De2WwFK2XL14+rY9z3ftiidnYM01l19j8uBRak47WEn0NyXo40rcLFZM1sJn9tjJbnnyFxg0dHjaxcYQtpdPIxCet06fPihAoGAfaqJ3CnsYXH3H4KG5Qxa8fpRCWWCbBEkZVOx+TxVkLMr8hOKz2i3Y93qgHOisimPS8XZwL6/QUsaJU0wsVVldw7Blp3JnDN4TrUa7R7sw4A4Dr6glLSTKDiQTCmw8PYkTXAHURHV8/le9G+DfBwqM8eeE3p5bZTdHVovmlwrp6kCgYEA7uTSOa0phZ7ts++FVdEZf9TI/B4tRuP4aT31BHs9UoCW1g01/NEEBDiHV9udq9B6Cd5onq+QFj4jiwakTNzXjhQZqgmag1TBE9VpahLxYAD5pYn/Tvm8l5vWuSKcOSwQb2lDg5R2/bmCJRV/QHRkdkAAhHGC/TrOskUCRgosUac="
|
||||||
|
,"json","GBK","MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAiJ8sLK4YYkjY+44zgeP8y+/aQGi86GDrjqh3kBC8YF61RZqaie8u+sJ4ruJ6xyn6eI0FSB8OPiJAbEzcAAUz4q8lcwEOMnW/6Kc5+M25VkQeEu5gIJ3NsKjuBTHMEjoh4e7jxQKrwfKGZhIs5W1yCUogxXd66htpfGQA48LsDNJ7ntX1CS7uuXdgejQxYASGtdXp5Kzcl/bj4mniBVutpb0zdVtgFKkyS735KOXoxMRlA5InuoOVuTCL1Ein6u7A5KbeSKEAqKAc4ySfwpH8P6yZaqDwxc1EogDQQAcLtIwCeNjBmHSfPncgw1DZWttMZjI120bVHua6Fcya64DIxQIDAQAB","RSA2");
|
||||||
|
AlipayTradePagePayRequest request = new AlipayTradePagePayRequest();
|
||||||
|
//异步接收地址,仅支持http/https,公网可访问
|
||||||
|
request.setNotifyUrl("");
|
||||||
|
//同步跳转地址,仅支持http/https
|
||||||
|
request.setReturnUrl("");
|
||||||
|
|
||||||
|
/******必传参数******/
|
||||||
|
JSONObject bizContent = new JSONObject();
|
||||||
|
//商户订单号,商家自定义,保持唯一性
|
||||||
|
bizContent.put("out_trade_no", "20210817010103044");
|
||||||
|
//支付金额,最小值0.01元
|
||||||
|
bizContent.put("total_amount", 0.01);
|
||||||
|
//订单标题,不可使用特殊符号
|
||||||
|
bizContent.put("subject", "测试商品");
|
||||||
|
//电脑网站支付场景固定传值FAST_INSTANT_TRADE_PAY
|
||||||
|
bizContent.put("product_code", "FAST_INSTANT_TRADE_PAY");
|
||||||
|
|
||||||
|
/******可选参数******/
|
||||||
|
//bizContent.put("time_expire", "2022-08-01 22:00:00");
|
||||||
|
|
||||||
|
//// 商品明细信息,按需传入
|
||||||
|
//JSONArray goodsDetail = new JSONArray();
|
||||||
|
//JSONObject goods1 = new JSONObject();
|
||||||
|
//goods1.put("goods_id", "goodsNo1");
|
||||||
|
//goods1.put("goods_name", "子商品1");
|
||||||
|
//goods1.put("quantity", 1);
|
||||||
|
//goods1.put("price", 0.01);
|
||||||
|
//goodsDetail.add(goods1);
|
||||||
|
//bizContent.put("goods_detail", goodsDetail);
|
||||||
|
|
||||||
|
//// 扩展信息,按需传入
|
||||||
|
//JSONObject extendParams = new JSONObject();
|
||||||
|
//extendParams.put("sys_service_provider_id", "2088511833207846");
|
||||||
|
//bizContent.put("extend_params", extendParams);
|
||||||
|
|
||||||
|
request.setBizContent(bizContent.toString());
|
||||||
|
AlipayTradePagePayResponse response = alipayClient.pageExecute(request);
|
||||||
|
if(response.isSuccess()){
|
||||||
|
System.out.println("调用成功");
|
||||||
|
} else {
|
||||||
|
System.out.println("调用失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,8 @@ import com.chaozhanggui.dao.system.entity.TbPlussDeviceSpec;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface TbPlussDeviceSpecMapper {
|
public interface TbPlussDeviceSpecMapper {
|
||||||
|
|
@ -16,6 +18,8 @@ public interface TbPlussDeviceSpecMapper {
|
||||||
|
|
||||||
TbPlussDeviceSpec selectByPrimaryKey(Integer id);
|
TbPlussDeviceSpec selectByPrimaryKey(Integer id);
|
||||||
|
|
||||||
|
List<TbPlussDeviceSpec> selectAll();
|
||||||
|
|
||||||
int updateByPrimaryKeySelective(TbPlussDeviceSpec record);
|
int updateByPrimaryKeySelective(TbPlussDeviceSpec record);
|
||||||
|
|
||||||
int updateByPrimaryKey(TbPlussDeviceSpec record);
|
int updateByPrimaryKey(TbPlussDeviceSpec record);
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,8 @@ import com.chaozhanggui.dao.system.entity.TbPlussDeviceStockGroup;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface TbPlussDeviceStockGroupMapper {
|
public interface TbPlussDeviceStockGroupMapper {
|
||||||
|
|
@ -16,6 +18,8 @@ public interface TbPlussDeviceStockGroupMapper {
|
||||||
|
|
||||||
TbPlussDeviceStockGroup selectByPrimaryKey(Integer id);
|
TbPlussDeviceStockGroup selectByPrimaryKey(Integer id);
|
||||||
|
|
||||||
|
List<TbPlussDeviceStockGroup> selectAll();
|
||||||
|
|
||||||
int updateByPrimaryKeySelective(TbPlussDeviceStockGroup record);
|
int updateByPrimaryKeySelective(TbPlussDeviceStockGroup record);
|
||||||
|
|
||||||
int updateByPrimaryKey(TbPlussDeviceStockGroup record);
|
int updateByPrimaryKey(TbPlussDeviceStockGroup record);
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,16 @@
|
||||||
package com.chaozhanggui.dao.system.dao;
|
package com.chaozhanggui.dao.system.dao;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.chaozhanggui.dao.system.entity.DTO.DeviceStockDTO;
|
||||||
import com.chaozhanggui.dao.system.entity.TbPlussDeviceStock;
|
import com.chaozhanggui.dao.system.entity.TbPlussDeviceStock;
|
||||||
|
|
||||||
|
import com.chaozhanggui.dao.system.entity.VO.DeviceStockVO;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface TbPlussDeviceStockMapper {
|
public interface TbPlussDeviceStockMapper {
|
||||||
|
|
@ -16,6 +22,8 @@ public interface TbPlussDeviceStockMapper {
|
||||||
|
|
||||||
TbPlussDeviceStock selectByPrimaryKey(Integer id);
|
TbPlussDeviceStock selectByPrimaryKey(Integer id);
|
||||||
|
|
||||||
|
List<DeviceStockVO> selectPageInfo(@Param("dto") DeviceStockDTO dto);
|
||||||
|
|
||||||
int updateByPrimaryKeySelective(TbPlussDeviceStock record);
|
int updateByPrimaryKeySelective(TbPlussDeviceStock record);
|
||||||
|
|
||||||
int updateByPrimaryKey(TbPlussDeviceStock record);
|
int updateByPrimaryKey(TbPlussDeviceStock record);
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,13 @@
|
||||||
package com.chaozhanggui.dao.system.dao;
|
package com.chaozhanggui.dao.system.dao;
|
||||||
|
|
||||||
|
import com.chaozhanggui.dao.system.entity.TbPlussDeviceStockGroup;
|
||||||
import com.chaozhanggui.dao.system.entity.TbPlussDeviceType;
|
import com.chaozhanggui.dao.system.entity.TbPlussDeviceType;
|
||||||
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface TbPlussDeviceTypeMapper {
|
public interface TbPlussDeviceTypeMapper {
|
||||||
|
|
@ -16,6 +19,8 @@ public interface TbPlussDeviceTypeMapper {
|
||||||
|
|
||||||
TbPlussDeviceType selectByPrimaryKey(Integer id);
|
TbPlussDeviceType selectByPrimaryKey(Integer id);
|
||||||
|
|
||||||
|
List<TbPlussDeviceType> selectAll();
|
||||||
|
|
||||||
int updateByPrimaryKeySelective(TbPlussDeviceType record);
|
int updateByPrimaryKeySelective(TbPlussDeviceType record);
|
||||||
|
|
||||||
int updateByPrimaryKey(TbPlussDeviceType record);
|
int updateByPrimaryKey(TbPlussDeviceType record);
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,8 @@ public interface TbPlussMerchantChannelStatusMapper {
|
||||||
TbPlussMerchantChannelStatus selectByMerchantCode(@Param("merchantCode") String merchantCode, @Param("channelId") Integer channelId);
|
TbPlussMerchantChannelStatus selectByMerchantCode(@Param("merchantCode") String merchantCode, @Param("channelId") Integer channelId);
|
||||||
|
|
||||||
int updateByPrimaryKeySelective(TbPlussMerchantChannelStatus record);
|
int updateByPrimaryKeySelective(TbPlussMerchantChannelStatus record);
|
||||||
|
int updateBymerchantCode(TbPlussMerchantChannelStatus record);
|
||||||
|
int updateByClearChannel(@Param("merchantcode")String merchantcode);
|
||||||
|
|
||||||
int updateByPrimaryKeyWithBLOBs(TbPlussMerchantChannelStatus record);
|
int updateByPrimaryKeyWithBLOBs(TbPlussMerchantChannelStatus record);
|
||||||
|
|
||||||
|
|
@ -37,6 +39,13 @@ public interface TbPlussMerchantChannelStatusMapper {
|
||||||
TbPlussMerchantChannelStatus getByCodeNullChannel(@Param("merchantCode") String merchantCode);
|
TbPlussMerchantChannelStatus getByCodeNullChannel(@Param("merchantCode") String merchantCode);
|
||||||
|
|
||||||
TbPlussMerchantChannelStatus getByMerchantCode(@Param("merchantCode") String merchantCode,@Param("channel") String channel );
|
TbPlussMerchantChannelStatus getByMerchantCode(@Param("merchantCode") String merchantCode,@Param("channel") String channel );
|
||||||
|
|
||||||
|
TbPlussMerchantChannelStatus getByMerchantCodeAndStatus(@Param("merchantCode") String merchantCode);
|
||||||
|
|
||||||
|
TbPlussMerchantChannelStatus getByMerchantCodeAndChannel(@Param("merchantCode") String merchantCode);
|
||||||
|
|
||||||
|
Integer getCountByMerchantCode(@Param("merchantCode") String merchantCode);
|
||||||
|
|
||||||
List<TbPlussMerchantChannelStatus> getByMerchantCodes(@Param("merchantCode") String merchantCode);
|
List<TbPlussMerchantChannelStatus> getByMerchantCodes(@Param("merchantCode") String merchantCode);
|
||||||
|
|
||||||
List<TbPlussMerchantChannelStatus> getByMerchantCodesAudit(@Param("merchantCode") String merchantCode);
|
List<TbPlussMerchantChannelStatus> getByMerchantCodesAudit(@Param("merchantCode") String merchantCode);
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
package com.chaozhanggui.dao.system.entity;
|
package com.chaozhanggui.dao.system.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
@ -52,6 +54,55 @@ public class TbPlussDeviceStock implements Serializable {
|
||||||
private String transferstatus;
|
private String transferstatus;
|
||||||
|
|
||||||
private Date bindtime;
|
private Date bindtime;
|
||||||
|
/**
|
||||||
|
*开始设备编号
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String startSnNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*结束设备编号
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String endSnNo;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String actUserId;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String buyUserId;
|
||||||
|
|
||||||
|
public String getActUserId() {
|
||||||
|
return actUserId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setActUserId(String actUserId) {
|
||||||
|
this.actUserId = actUserId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBuyUserId() {
|
||||||
|
return buyUserId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBuyUserId(String buyUserId) {
|
||||||
|
this.buyUserId = buyUserId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getStartSnNo() {
|
||||||
|
return startSnNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStartSnNo(String startSnNo) {
|
||||||
|
this.startSnNo = startSnNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getEndSnNo() {
|
||||||
|
return endSnNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEndSnNo(String endSnNo) {
|
||||||
|
this.endSnNo = endSnNo;
|
||||||
|
}
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,11 @@
|
||||||
<include refid="Base_Column_List" />
|
<include refid="Base_Column_List" />
|
||||||
from tb_pluss_device_spec
|
from tb_pluss_device_spec
|
||||||
where id = #{id,jdbcType=INTEGER}
|
where id = #{id,jdbcType=INTEGER}
|
||||||
|
</select>
|
||||||
|
<select id="selectAll" resultType="com.chaozhanggui.dao.system.entity.TbPlussDeviceSpec">
|
||||||
|
select
|
||||||
|
<include refid="Base_Column_List" />
|
||||||
|
from tb_pluss_device_spec
|
||||||
</select>
|
</select>
|
||||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||||
delete from tb_pluss_device_spec
|
delete from tb_pluss_device_spec
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@
|
||||||
<result column="updater" jdbcType="INTEGER" property="updater" />
|
<result column="updater" jdbcType="INTEGER" property="updater" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
id, groupCode, groupName, desc, sort, createTime, updateTime, creator, updater
|
id, groupCode, groupName, `desc`, sort, createTime, updateTime, creator, updater
|
||||||
</sql>
|
</sql>
|
||||||
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
||||||
select
|
select
|
||||||
|
|
@ -21,6 +21,11 @@
|
||||||
from tb_pluss_device_stock_group
|
from tb_pluss_device_stock_group
|
||||||
where id = #{id,jdbcType=INTEGER}
|
where id = #{id,jdbcType=INTEGER}
|
||||||
</select>
|
</select>
|
||||||
|
<select id="selectAll" resultType="com.chaozhanggui.dao.system.entity.TbPlussDeviceStockGroup">
|
||||||
|
select
|
||||||
|
<include refid="Base_Column_List" />
|
||||||
|
from tb_pluss_device_stock_group
|
||||||
|
</select>
|
||||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||||
delete from tb_pluss_device_stock_group
|
delete from tb_pluss_device_stock_group
|
||||||
where id = #{id,jdbcType=INTEGER}
|
where id = #{id,jdbcType=INTEGER}
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,99 @@
|
||||||
<include refid="Base_Column_List" />
|
<include refid="Base_Column_List" />
|
||||||
from tb_pluss_device_stock
|
from tb_pluss_device_stock
|
||||||
where id = #{id,jdbcType=INTEGER}
|
where id = #{id,jdbcType=INTEGER}
|
||||||
|
</select>
|
||||||
|
<select id="selectPageInfo" resultType="com.chaozhanggui.dao.system.entity.VO.DeviceStockVO">
|
||||||
|
SELECT ds.*, mbi.userId actUserId, mbi2.userId buyUserId,
|
||||||
|
dt.name as deviceName,
|
||||||
|
dg.deviceLogo,
|
||||||
|
ue.userName as extractName,
|
||||||
|
ub.userName as belongName
|
||||||
|
FROM tb_pluss_device_stock ds
|
||||||
|
left join tb_pluss_device_type dt on ds.`code` = dt.`code`
|
||||||
|
left join tb_pluss_device_goods dg on ds.`code` = dg.`code`
|
||||||
|
left join tb_pluss_user_app ue on ds.extractUserId = ue.userId
|
||||||
|
left join tb_pluss_user_app ub on ds.belongUserId = ub.userId
|
||||||
|
LEFT JOIN tb_pluss_merchant_base_info mbi ON mbi.id = ds.actMercId
|
||||||
|
LEFT JOIN tb_pluss_merchant_base_info mbi2 ON mbi2.id = ds.buyMercId
|
||||||
|
<where>
|
||||||
|
<if test="dto.code != null and dto.code != ''">
|
||||||
|
and ds.`code` = #{dto.code}
|
||||||
|
</if>
|
||||||
|
<if test="dto.userId != null">
|
||||||
|
<choose>
|
||||||
|
<when test="dto.pType != null">
|
||||||
|
<choose>
|
||||||
|
<when test='dto.pType == "2"'>
|
||||||
|
and (belongUserId = #{dto.userId} or belongUserId in (select userId from tb_pluss_user_app
|
||||||
|
where pidArr like CONCAT('%,',#{dto.userId})))
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
and belongUserId = #{dto.userId}
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
and ds.belongUserId = #{dto.userId}
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
|
</if>
|
||||||
|
<if test="dto.extractUserId != null">
|
||||||
|
and ds.extractUserId = #{dto.extractuserid}
|
||||||
|
</if>
|
||||||
|
<if test="dto.startDate != null and dto.startDate != ''">
|
||||||
|
and DATE_FORMAT(ds.inStockTime,'%Y-%m-%d') <![CDATA[ >= ]]> #{dto.startDate}
|
||||||
|
</if>
|
||||||
|
<if test="dto.endDate != null and dto.endDate != ''">
|
||||||
|
and DATE_FORMAT(ds.inStockTime,'%Y-%m-%d') <![CDATA[ <= ]]> #{dto.endDate}
|
||||||
|
</if>
|
||||||
|
|
||||||
|
<if test="dto.startSnNo != null and dto.startSnNo != ''">
|
||||||
|
and ds.deviceNo <![CDATA[ >= ]]> #{dto.startSnNo}
|
||||||
|
</if>
|
||||||
|
<if test="dto.endSnNo != null and dto.endSnNo != ''">
|
||||||
|
and ds.deviceNo <![CDATA[ <= ]]> #{dto.endSnNo}
|
||||||
|
</if>
|
||||||
|
<if test="dto.startDeviceNo != null and dto.startDeviceNo != ''">
|
||||||
|
and ds.snNo <![CDATA[ >= ]]> #{dto.startDeviceNo}
|
||||||
|
</if>
|
||||||
|
<if test="dto.endDeviceNo != null and dto.endDeviceNo != ''">
|
||||||
|
and ds.snNo <![CDATA[ <= ]]> #{dto.endDeviceNo}
|
||||||
|
</if>
|
||||||
|
|
||||||
|
<if test="dto.type != null and dto.type != ''">
|
||||||
|
and ds.type = #{dto.type}
|
||||||
|
</if>
|
||||||
|
|
||||||
|
<if test="dto.buyMercName != null and dto.buyMercName != ''">
|
||||||
|
and ds.buyMercName = #{dto.buymercname}
|
||||||
|
</if>
|
||||||
|
|
||||||
|
<if test="dto.actMercName != null and dto.actMercName != ''">
|
||||||
|
and ds.actMercName = #{dto.actmercname}
|
||||||
|
</if>
|
||||||
|
|
||||||
|
<if test="dto.actUserId != null and dto.actUserId != ''">
|
||||||
|
and mbi.userId = #{dto.actUserId}
|
||||||
|
</if>
|
||||||
|
|
||||||
|
<if test="dto.deviceNo != null and dto.deviceNo != ''">
|
||||||
|
and ds.deviceNo = #{dto.deviceno}
|
||||||
|
</if>
|
||||||
|
<if test="dto.snNo != null and dto.snNo != ''">
|
||||||
|
and (ds.snNo like CONCAT('%',#{dto.snno},'%') or ds.deviceNo like CONCAT('%',#{dto.snno},'%') )
|
||||||
|
</if>
|
||||||
|
<if test="dto.bindStatus != '-2'">
|
||||||
|
<choose>
|
||||||
|
<when test="dto.bindStatus == null or dto.bindStatus == '' or dto.bindStatus == '-1'">
|
||||||
|
and ds.status in ('1','2')
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
and ds.status = '3'
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
order by ds.id desc
|
||||||
</select>
|
</select>
|
||||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||||
delete from tb_pluss_device_stock
|
delete from tb_pluss_device_stock
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@
|
||||||
<result column="payCodeFlag" jdbcType="VARCHAR" property="paycodeflag" />
|
<result column="payCodeFlag" jdbcType="VARCHAR" property="paycodeflag" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
id, code, name, desc, createTime, updateTime, creator, updater, showFlag, deviceLogo,
|
id, code, name, `desc`, createTime, updateTime, creator, updater, showFlag, deviceLogo,
|
||||||
payCodeFlag
|
payCodeFlag
|
||||||
</sql>
|
</sql>
|
||||||
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
||||||
|
|
@ -23,6 +23,11 @@
|
||||||
<include refid="Base_Column_List" />
|
<include refid="Base_Column_List" />
|
||||||
from tb_pluss_device_type
|
from tb_pluss_device_type
|
||||||
where id = #{id,jdbcType=INTEGER}
|
where id = #{id,jdbcType=INTEGER}
|
||||||
|
</select>
|
||||||
|
<select id="selectAll" resultType="com.chaozhanggui.dao.system.entity.TbPlussDeviceType">
|
||||||
|
select
|
||||||
|
<include refid="Base_Column_List" />
|
||||||
|
from tb_pluss_device_type
|
||||||
</select>
|
</select>
|
||||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||||
delete from tb_pluss_device_type
|
delete from tb_pluss_device_type
|
||||||
|
|
|
||||||
|
|
@ -340,6 +340,83 @@
|
||||||
auditSuccessTime = #{auditsuccesstime,jdbcType=TIMESTAMP}
|
auditSuccessTime = #{auditsuccesstime,jdbcType=TIMESTAMP}
|
||||||
where id = #{id,jdbcType=INTEGER}
|
where id = #{id,jdbcType=INTEGER}
|
||||||
</update>
|
</update>
|
||||||
|
<update id="updateByClearChannel" parameterType="com.chaozhanggui.dao.system.entity.TbPlussMerchantChannelStatus">
|
||||||
|
update tb_pluss_merchant_channel_status
|
||||||
|
set channel = NULL,
|
||||||
|
status = '1',
|
||||||
|
thirdStatus = '-100',
|
||||||
|
merchantId = NULL,
|
||||||
|
applicationId = NULL
|
||||||
|
where
|
||||||
|
merchantCode = #{merchantcode,jdbcType=VARCHAR}
|
||||||
|
AND (status IN (2, 0) OR (status = 1 AND thirdStatus = -999));
|
||||||
|
</update>
|
||||||
|
<update id="updateBymerchantCode" parameterType="com.chaozhanggui.dao.system.entity.TbPlussMerchantChannelStatus">
|
||||||
|
update tb_pluss_merchant_channel_status
|
||||||
|
<set>
|
||||||
|
<if test="channel != null">
|
||||||
|
channel = #{channel,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="merchantcode != null">
|
||||||
|
merchantCode = #{merchantcode,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="merchantid != null">
|
||||||
|
merchantId = #{merchantid,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="settlementtype != null">
|
||||||
|
settlementType = #{settlementtype,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="status != null">
|
||||||
|
status = #{status,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="thirdstatus != null">
|
||||||
|
thirdStatus = #{thirdstatus,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="remark != null">
|
||||||
|
remark = #{remark,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="createtime != null">
|
||||||
|
createTime = #{createtime,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
<if test="updatetime != null">
|
||||||
|
updateTime = #{updatetime,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
<if test="applicationid != null">
|
||||||
|
applicationId = #{applicationid,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="callbackstatus != null">
|
||||||
|
callbackStatus = #{callbackstatus,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="valid != null">
|
||||||
|
valid = #{valid,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="authorizationstatus != null">
|
||||||
|
authorizationStatus = #{authorizationstatus,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="srcmerchantno != null">
|
||||||
|
srcMerchantNo = #{srcmerchantno,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="interfaceversion != null">
|
||||||
|
interfaceVersion = #{interfaceversion,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="aliauthorizationstatus != null">
|
||||||
|
aliAuthorizationStatus = #{aliauthorizationstatus,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="wxcerturl != null">
|
||||||
|
wxCertUrl = #{wxcerturl,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="alicerturl != null">
|
||||||
|
aliCertUrl = #{alicerturl,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="auditsuccesstime != null">
|
||||||
|
auditSuccessTime = #{auditsuccesstime,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
<if test="extra != null">
|
||||||
|
extra = #{extra,jdbcType=LONGVARCHAR},
|
||||||
|
</if>
|
||||||
|
</set>
|
||||||
|
where merchantCode = #{merchantcode,jdbcType=VARCHAR},
|
||||||
|
</update>
|
||||||
|
|
||||||
<select id="selectByUserId" resultType="java.util.Map">
|
<select id="selectByUserId" resultType="java.util.Map">
|
||||||
|
|
||||||
|
|
@ -480,4 +557,29 @@
|
||||||
AND status In (1,3,6)
|
AND status In (1,3,6)
|
||||||
and channel=#{channel}
|
and channel=#{channel}
|
||||||
</select>
|
</select>
|
||||||
|
<select id="getByMerchantCodeAndStatus"
|
||||||
|
resultType="com.chaozhanggui.dao.system.entity.TbPlussMerchantChannelStatus">
|
||||||
|
SELECT *
|
||||||
|
FROM tb_pluss_merchant_channel_status
|
||||||
|
WHERE merchantCode = #{merchantCode}
|
||||||
|
AND status = '1'
|
||||||
|
AND thirdStatus = '-100'
|
||||||
|
LIMIT 1
|
||||||
|
</select>
|
||||||
|
<select id="getByMerchantCodeAndChannel"
|
||||||
|
resultType="com.chaozhanggui.dao.system.entity.TbPlussMerchantChannelStatus">
|
||||||
|
SELECT *
|
||||||
|
FROM tb_pluss_merchant_channel_status
|
||||||
|
WHERE merchantCode = #{merchantCode}
|
||||||
|
AND channel = 1
|
||||||
|
AND status <![CDATA[ <> ]]> 3
|
||||||
|
LIMIT 1
|
||||||
|
</select>
|
||||||
|
<select id="getCountByMerchantCode"
|
||||||
|
resultType="java.lang.Integer">
|
||||||
|
select count(1)
|
||||||
|
FROM tb_pluss_merchant_channel_status
|
||||||
|
WHERE merchantCode = #{merchantCode}
|
||||||
|
AND status <![CDATA[ <> ]]> 1
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
@ -49,7 +49,9 @@
|
||||||
tb_pluss_notice
|
tb_pluss_notice
|
||||||
WHERE
|
WHERE
|
||||||
typeFirst = 1
|
typeFirst = 1
|
||||||
|
AND typeSecond != -1
|
||||||
AND isDeal = 0
|
AND isDeal = 0
|
||||||
|
OR isDeal IS NULL
|
||||||
</select>
|
</select>
|
||||||
<select id="selectByNoticeCode" resultType="com.chaozhanggui.dao.system.entity.TbPlussNotice">
|
<select id="selectByNoticeCode" resultType="com.chaozhanggui.dao.system.entity.TbPlussNotice">
|
||||||
select * from tb_pluss_notice
|
select * from tb_pluss_notice
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue