40 changed files with 936 additions and 9 deletions
@ -0,0 +1,9 @@ |
|||||
|
package com.cyjd.rights.config; |
||||
|
|
||||
|
import org.springframework.context.annotation.Configuration; |
||||
|
import springfox.documentation.swagger2.annotations.EnableSwagger2; |
||||
|
|
||||
|
@Configuration |
||||
|
@EnableSwagger2 |
||||
|
public class SwaggerConfig { |
||||
|
} |
||||
@ -0,0 +1,28 @@ |
|||||
|
package com.cyjd.rights.config; |
||||
|
|
||||
|
import org.springframework.context.annotation.Configuration; |
||||
|
import org.springframework.web.servlet.config.annotation.CorsRegistry; |
||||
|
import org.springframework.web.servlet.config.annotation.InterceptorRegistry; |
||||
|
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; |
||||
|
|
||||
|
/** |
||||
|
* MVC配置 |
||||
|
* |
||||
|
* @author yz |
||||
|
*/ |
||||
|
@Configuration |
||||
|
public class WebMvcConfig implements WebMvcConfigurer { |
||||
|
|
||||
|
|
||||
|
@Override |
||||
|
public void addCorsMappings(CorsRegistry registry) { |
||||
|
registry.addMapping("/**") |
||||
|
.allowedOriginPatterns("*") // 允许所有来源
|
||||
|
.allowCredentials(true) |
||||
|
.allowedMethods("GET", "POST", "PUT", "DELETE") |
||||
|
.allowedHeaders("*") |
||||
|
.exposedHeaders("Header-1"); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
} |
||||
@ -0,0 +1,40 @@ |
|||||
|
package com.cyjd.rights.controller; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.cyjd.rights.business.service.AliPayOrderService; |
||||
|
import com.cyjd.rights.dto.AliPayInOrderDto; |
||||
|
import com.cyjd.rights.entity.AliPayOrderEntity; |
||||
|
import com.cyjd.rights.vo.AliPayOrderVo; |
||||
|
import com.github.pagehelper.PageHelper; |
||||
|
import com.github.pagehelper.PageInfo; |
||||
|
import io.swagger.annotations.Api; |
||||
|
import io.swagger.annotations.ApiOperation; |
||||
|
import io.swagger.annotations.ApiParam; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.validation.annotation.Validated; |
||||
|
import org.springframework.web.bind.annotation.PostMapping; |
||||
|
import org.springframework.web.bind.annotation.RequestBody; |
||||
|
import org.springframework.web.bind.annotation.RequestMapping; |
||||
|
import org.springframework.web.bind.annotation.RestController; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
@Api(value = "支付宝支付订单接口",tags = "支付宝支付订单接口") |
||||
|
@RestController |
||||
|
@RequestMapping("/aliPayOrder") |
||||
|
@Slf4j |
||||
|
public class AliPayOrderController { |
||||
|
@Autowired |
||||
|
private AliPayOrderService aliPayOrderService; |
||||
|
@ApiOperation(value="查看用户支付记录分页") |
||||
|
@PostMapping(value = "/page") |
||||
|
public IPage<AliPayOrderVo> pageOrder(@Validated @RequestBody @ApiParam("用户支付订单对象") AliPayInOrderDto dto){ |
||||
|
PageHelper.startPage(dto.getPageNum(), dto.getPageSize()); |
||||
|
IPage<AliPayOrderVo> page = aliPayOrderService.getPageOrder(dto); |
||||
|
return page; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
} |
||||
@ -0,0 +1,36 @@ |
|||||
|
package com.cyjd.rights.controller; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.cyjd.rights.business.service.AliPaySigningOrderService; |
||||
|
import com.cyjd.rights.dto.AliPayInOrderDto; |
||||
|
import com.cyjd.rights.dto.AliPaySignOrderDto; |
||||
|
import com.cyjd.rights.vo.AliPayOrderVo; |
||||
|
import com.cyjd.rights.vo.AliPaySigningOrderVo; |
||||
|
import com.github.pagehelper.PageHelper; |
||||
|
import io.swagger.annotations.Api; |
||||
|
import io.swagger.annotations.ApiOperation; |
||||
|
import io.swagger.annotations.ApiParam; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.validation.annotation.Validated; |
||||
|
import org.springframework.web.bind.annotation.PostMapping; |
||||
|
import org.springframework.web.bind.annotation.RequestBody; |
||||
|
import org.springframework.web.bind.annotation.RequestMapping; |
||||
|
import org.springframework.web.bind.annotation.RestController; |
||||
|
|
||||
|
@Api(value = "支付宝签约订单接口",tags = "支付宝签约订单接口") |
||||
|
@RestController |
||||
|
@RequestMapping("/aliPaySigningOrder") |
||||
|
@Slf4j |
||||
|
public class AliPaySigningOrderController { |
||||
|
@Autowired |
||||
|
private AliPaySigningOrderService aliPaySigningOrderService; |
||||
|
@ApiOperation(value="查看用户签约记录分页") |
||||
|
@PostMapping(value = "/page") |
||||
|
public IPage<AliPaySigningOrderVo> pageOrder(@Validated @RequestBody @ApiParam("用户签约对象") AliPaySignOrderDto dto){ |
||||
|
PageHelper.startPage(dto.getPageNum(), dto.getPageSize()); |
||||
|
IPage<AliPaySigningOrderVo> page = aliPaySigningOrderService.getPageOrder(dto); |
||||
|
return page; |
||||
|
} |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,54 @@ |
|||||
|
package com.cyjd.rights.controller; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.cyjd.rights.beans.R; |
||||
|
import com.cyjd.rights.business.service.ConfigService; |
||||
|
import com.cyjd.rights.dto.AliPaySignOrderDto; |
||||
|
import com.cyjd.rights.dto.UpdateConfigDto; |
||||
|
import com.cyjd.rights.entity.ConfigEntity; |
||||
|
import com.cyjd.rights.vo.AliPaySigningOrderVo; |
||||
|
import com.github.pagehelper.PageHelper; |
||||
|
import io.swagger.annotations.Api; |
||||
|
import io.swagger.annotations.ApiOperation; |
||||
|
import io.swagger.annotations.ApiParam; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.validation.annotation.Validated; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
|
||||
|
@Api(value = "配置类接口", tags = "配置类接口") |
||||
|
@RestController |
||||
|
@RequestMapping("/configService") |
||||
|
@Slf4j |
||||
|
public class ConfigServiceController { |
||||
|
@Autowired |
||||
|
private ConfigService configService; |
||||
|
|
||||
|
@ApiOperation(value = "展示对应的配置内容") |
||||
|
@PostMapping(value = "/list") |
||||
|
public R list(@RequestParam @ApiParam("配置名称") String configName) { |
||||
|
if (configName != null && !"".equals(configName)) { |
||||
|
return R.ok().put("list", configService.list(new QueryWrapper<ConfigEntity>().eq("config_name", configName))); |
||||
|
} |
||||
|
return R.error("500", "缺少参数configName"); |
||||
|
} |
||||
|
|
||||
|
@ApiOperation(value = "修改对应的配置内容") |
||||
|
@PostMapping(value = "/update") |
||||
|
public R update(@Validated @RequestBody @ApiParam("用户签约对象") UpdateConfigDto dto) { |
||||
|
UpdateWrapper<ConfigEntity> updateWrapper = new UpdateWrapper<>(); |
||||
|
updateWrapper.eq("config_name",dto.getConfigName()); |
||||
|
if (dto.getConfigName().equals("hj")){ //核减值只能小于等于10大于等于0
|
||||
|
if (!configService.checkHjValue(dto.getConfigValue())){ |
||||
|
return R.error("500", "核减值只能小于等于10大于等于0"); |
||||
|
} |
||||
|
} |
||||
|
updateWrapper.set("config_value",dto.getConfigValue()); |
||||
|
if (configService.update(new ConfigEntity(),updateWrapper)) { |
||||
|
return R.ok(); |
||||
|
} |
||||
|
return R.error(); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,44 @@ |
|||||
|
package com.cyjd.rights.controller; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
|
import com.cyjd.rights.beans.R; |
||||
|
import com.cyjd.rights.business.service.LinkService; |
||||
|
import com.cyjd.rights.dto.AddLinkDto; |
||||
|
import com.cyjd.rights.entity.ConfigEntity; |
||||
|
import com.cyjd.rights.entity.LinkEntity; |
||||
|
import io.swagger.annotations.Api; |
||||
|
import io.swagger.annotations.ApiOperation; |
||||
|
import io.swagger.annotations.ApiParam; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.validation.annotation.Validated; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
|
||||
|
@Api(value = "链接类接口", tags = "链接类接口") |
||||
|
@RestController |
||||
|
@RequestMapping("/link") |
||||
|
@Slf4j |
||||
|
public class LinkController { |
||||
|
@Autowired |
||||
|
private LinkService linkService; |
||||
|
|
||||
|
@ApiOperation(value = "展示推广链接的详情") |
||||
|
@PostMapping(value = "/list") |
||||
|
public R list() { |
||||
|
return R.ok().put("list",linkService.list(new QueryWrapper<>())); |
||||
|
} |
||||
|
|
||||
|
@ApiOperation(value = "添加链接") |
||||
|
@PostMapping(value = "/add") |
||||
|
public R add(@Validated @RequestBody AddLinkDto dto) { |
||||
|
//先检查这个linkId是否已经被使用过了
|
||||
|
if (linkService.checkLinkId(dto.getLinkId())){ |
||||
|
LinkEntity linkEntity = new LinkEntity(dto.getLinkId(), dto.getLinkName(), dto.getAffiliationCompanyName()); |
||||
|
if (linkService.save(linkEntity)) { |
||||
|
return R.ok(); |
||||
|
} |
||||
|
return R.error(); |
||||
|
} |
||||
|
return R.error("500","链接id重复"); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,38 @@ |
|||||
|
package com.cyjd.rights.controller; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.cyjd.rights.business.service.AliPayOrderService; |
||||
|
import com.cyjd.rights.business.service.RightsOrderService; |
||||
|
import com.cyjd.rights.dto.AliPayInOrderDto; |
||||
|
import com.cyjd.rights.dto.RightsOrderDto; |
||||
|
import com.cyjd.rights.vo.AliPayOrderVo; |
||||
|
import com.cyjd.rights.vo.RightsOrderVo; |
||||
|
import com.github.pagehelper.PageHelper; |
||||
|
import io.swagger.annotations.Api; |
||||
|
import io.swagger.annotations.ApiOperation; |
||||
|
import io.swagger.annotations.ApiParam; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.validation.annotation.Validated; |
||||
|
import org.springframework.web.bind.annotation.PostMapping; |
||||
|
import org.springframework.web.bind.annotation.RequestBody; |
||||
|
import org.springframework.web.bind.annotation.RequestMapping; |
||||
|
import org.springframework.web.bind.annotation.RestController; |
||||
|
|
||||
|
@Api(value = "权益领取订单接口",tags = "权益领取订单接口") |
||||
|
@RestController |
||||
|
@RequestMapping("/rightsOrder") |
||||
|
@Slf4j |
||||
|
public class RightsOrderController { |
||||
|
@Autowired |
||||
|
private RightsOrderService rightsOrderService; |
||||
|
@ApiOperation(value="查看用户领取权益记录分页") |
||||
|
@PostMapping(value = "/page") |
||||
|
public IPage<RightsOrderVo> pageOrder(@Validated @RequestBody @ApiParam("用户领取权益对象") RightsOrderDto dto){ |
||||
|
PageHelper.startPage(dto.getPageNum(), dto.getPageSize()); |
||||
|
IPage<RightsOrderVo> page = rightsOrderService.getPageOrder(dto); |
||||
|
return page; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
} |
||||
@ -0,0 +1,59 @@ |
|||||
|
spring: |
||||
|
|
||||
|
datasource: |
||||
|
driver-class-name: com.mysql.cj.jdbc.Driver |
||||
|
url: jdbc:mysql://203.104.38.186:6002/rights?allowMultiQueries=true&useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai&autoReconnect=true&failOverReadOnly=false&rewriteBatchedStatements=true |
||||
|
username: bnyer_cloud |
||||
|
password: CIYUANjiedian2021. |
||||
|
hikari: |
||||
|
maximum-pool-size: 2 |
||||
|
|
||||
|
redis: |
||||
|
host: 117.50.61.7 |
||||
|
port: 6379 |
||||
|
password: Ck200582 |
||||
|
database: 2 |
||||
|
timeout: 5000s # 数据库连接超时时间,2.0 中该参数的类型为Duration,这里在配置的时候需要指明单位 |
||||
|
# 连接池配置,2.0中直接使用jedis或者lettuce配置连接池 |
||||
|
block-when-exhausted: true |
||||
|
test-while-idle: true |
||||
|
test-on-borrow: true |
||||
|
jedis: |
||||
|
pool: |
||||
|
# 最大空闲连接数 |
||||
|
max-idle: 500 |
||||
|
# 最小空闲连接数 |
||||
|
min-idle: 50 |
||||
|
# 等待可用连接的最大时间,负数为不限制 |
||||
|
max-wait: -1 |
||||
|
# 最大活跃连接数,负数为不限制 |
||||
|
max-active: -1 |
||||
|
cache: |
||||
|
redis: |
||||
|
#毫秒 |
||||
|
time-to-live: -1 |
||||
|
payment: |
||||
|
ali: |
||||
|
appId: 2021003135690045 |
||||
|
privateKey: MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCGq3UKNbNuIazHbD9slLNJsStw2347rYwR1NmFLCi/d62yNLeTZvmrY4aW3GsDsQiK5vFdLRxaT8tIkGO11GilBRn00xkNKnwPkMA8GUdtr7GaudH+YBqk2snDeBhtdlYLq1V79USGZKdnpsPoUIXVIpyhnBlULzcJP7hf7NSauRVBnDf+MuEQOjhRAc6i8RN7nY2Oz5x6ZuIPhJ8qWjbZQoN6sJ00KU5oYZaN34/NGmPIfpR4QwbZbABm0Y0dCwkXzzNoV3cPYsFqKWNN8gxY7mI7YQqYsVb25fvALDjOl0XUGv1D7lMOC4mX3iz4q8b13ZNK+Tb3y4atwO6jK0EdAgMBAAECggEAUb4ZGM1n0F2YZqQKC3pnKT/lQme4w7if4OL19aPMSAv43sao90v2GFYdB81bF66JpOZxc0FCiH8OwUkDfQclTaU/ECBigF9dVoViahheBvIyN9y63lCvW4mCFqf7C9ZcfFDPXqKNqZXHF19eYtEdqzWLJX1+0l6mZXLME03J7u+tPX+OOnjf/K3wBp90RzoS02Ofp8fxiRyiDwFwlcxfRVbffLPVIW8JMqyOuI95U0l90F3N48+twJj8UeZlWHQeTGSDZ5jgfC6T5SXkDxOi6e7ZemZUG43rqsEHyb84fBfpr4ZFh9SkjXSnRih5w0VRws50dE2u1wAeCLG8K5KD8QKBgQDX/rpHjIJl0aD2LsI1kcUW82Yzm7qOJWApRCTe/+mZtrNGotzz/Mc2S0xV8s95ahgsH9AYqytu58UdM0CQhJ5+57fPDQcYWq9QvHB741ljAd1371qTLvRsMQg6E/nmObFvAON7ynNuh+TfkM9e7HQS6dpA0FkVqrREdD7hgUeUewKBgQCfnL3GKdMdH5FTTMBJgiLwHYBpgFQxDPzD5DEvz9lgCgosk76k4jQGi/3/raJWxkAED5K4O2J90IE/VnRXV4Uhi4h54D3ceO9dtXWBN1IxqEuO7pw9ldiRjFrlTo4aSgnq2wrjiVKn92Fm2YXIcAyhibUs7hamWt6LGAULbM5JRwKBgG11jXlM35gxz9xyfcEgCj1DQ/vLY5M9panD+tt33S4kxF17k3WiGGKPbjPwROxGs9FInfCibfRaSC4wFvwl+Rxe2Wt4MqxI6KeFl4tw/4+JFm79QW1tUjix8HVeQjpF6oFSdfX59t2AyJ/zhuOX+IrNL+nArCSqyYgXUPZ+yYOZAoGATbLAkxnDInc+iF1hcac/GMJTw4fr9CDNXxLTeuHkgKMChua5NIzFJLa7Q96jmzhQ62klVDfcX0DD2jBc3DPHpCfHnQSzOINKisSN2gQzJ+c0OPUg673pOhkoGl5eQJ/wKfrNVyx/JzL+oFGdlZAuJejiYGfacMrlcLKVqhUiansCgYEAtPCz8J3fYipscjdWKQIXsejr110KF0zsh8X7ZYKxhAgRZ5ck3wbMbffYIfa7wCm5nIJMY640P3Jh6Rb5W5/4/i04gHbE1Loi714aGCXoY6gm5oVoKIFP8h3g3MyQl7mZ2huAA/KnLsThlmfQ0l0n6Pd8xEcqJ+Ggi/GS2MQQrIw= |
||||
|
publicKey: MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAhqt1CjWzbiGsx2w/bJSzSbErcNt+O62MEdTZhSwov3etsjS3k2b5q2OGltxrA7EIiubxXS0cWk/LSJBjtdRopQUZ9NMZDSp8D5DAPBlHba+xmrnR/mAapNrJw3gYbXZWC6tVe/VEhmSnZ6bD6FCF1SKcoZwZVC83CT+4X+zUmrkVQZw3/jLhEDo4UQHOovETe52Njs+cembiD4SfKlo22UKDerCdNClOaGGWjd+PzRpjyH6UeEMG2WwAZtGNHQsJF88zaFd3D2LBailjTfIMWO5iO2EKmLFW9uX7wCw4zpdF1Br9Q+5TDguJl94s+KvG9d2TSvk298uGrcDuoytBHQIDAQAB |
||||
|
certPath: D:/firefox/rights/ |
||||
|
signNotifyUrl: https://interface.bnyer.cn/alipay/signNotify |
||||
|
agreementNotifyUrl: https://interface.bnyer.cn/alipay/agreementNotify |
||||
|
signReturnUrl: https://vediocnd.corpring.com/hotVIP/paybackImg.png |
||||
|
yunmei: |
||||
|
url: https://yh.yunemei.com |
||||
|
|
||||
|
logging: |
||||
|
level: |
||||
|
com.cyjd.rights.business.mapper: debug |
||||
|
|
||||
|
mybatis-plus: |
||||
|
mapper-locations: classpath:mapper/business/*.xml |
||||
|
|
||||
|
pagehelper: |
||||
|
# 指定使用的数据库数据库 |
||||
|
helperDialect: mysql |
||||
|
# reasonable:分页合理化参数,默认值为false。当该参数设置为 true 时,pageNum<=0 时会查询第一页, pageNum>pages(超过总数时),会查询最后一页。默认false 时,直接根据参数进行查询。 |
||||
|
reasonable: true |
||||
|
|
||||
@ -0,0 +1,12 @@ |
|||||
|
# Tomcat |
||||
|
server: |
||||
|
port: 8085 |
||||
|
|
||||
|
# Spring |
||||
|
spring: |
||||
|
application: |
||||
|
# 应用名称 |
||||
|
name: right-admin |
||||
|
profiles: |
||||
|
# 环境配置 |
||||
|
active: dev |
||||
@ -0,0 +1,28 @@ |
|||||
|
package com.cyjd.rights.dto; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
import lombok.EqualsAndHashCode; |
||||
|
import lombok.experimental.Accessors; |
||||
|
|
||||
|
import javax.validation.constraints.NotNull; |
||||
|
|
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper = false) |
||||
|
@Accessors(chain = true) |
||||
|
public class AddLinkDto { |
||||
|
/** |
||||
|
* 链接id |
||||
|
*/ |
||||
|
@NotNull(message = "链接id不能为空!") |
||||
|
private Integer linkId; |
||||
|
/** |
||||
|
* 链接名字 |
||||
|
*/ |
||||
|
@NotNull(message = "链接名字不能为空!") |
||||
|
private String linkName; |
||||
|
/** |
||||
|
* 链接所属公司 |
||||
|
*/ |
||||
|
@NotNull(message = "链接所属公司不能为空!") |
||||
|
private String affiliationCompanyName; |
||||
|
} |
||||
@ -0,0 +1,47 @@ |
|||||
|
package com.cyjd.rights.dto; |
||||
|
|
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.time.LocalDateTime; |
||||
|
|
||||
|
/** |
||||
|
* @author :WXC |
||||
|
* @Date :2023/05/16 |
||||
|
* @description : |
||||
|
*/ |
||||
|
@ApiModel(value = "支付签约请求") |
||||
|
@Data |
||||
|
public class AliPaySignOrderDto extends BasePageDto{ |
||||
|
|
||||
|
@ApiModelProperty(value = "签约号") |
||||
|
private String outTradeNo; |
||||
|
|
||||
|
|
||||
|
@ApiModelProperty(value = "链接Id") |
||||
|
private String linkId; |
||||
|
|
||||
|
@ApiModelProperty(value = "链接名字") |
||||
|
private String linkName; |
||||
|
|
||||
|
@ApiModelProperty(value = "手机号") |
||||
|
private String mobile; |
||||
|
/** |
||||
|
* 0失败 1成功 2发起支付成功回调还没来 |
||||
|
*/ |
||||
|
@ApiModelProperty(value = "订单状态") |
||||
|
private String status; |
||||
|
|
||||
|
@ApiModelProperty(value = "查询订单时间(开始)") |
||||
|
private LocalDateTime beginTime; |
||||
|
|
||||
|
@ApiModelProperty(value = "查询订单时间(结束)") |
||||
|
private LocalDateTime endTime; |
||||
|
|
||||
|
@ApiModelProperty(value = "查询下次支付的时间(开始)") |
||||
|
private LocalDateTime beginSearchNextPayTime; |
||||
|
|
||||
|
@ApiModelProperty(value = "查询下次支付的时间(结束)") |
||||
|
private LocalDateTime endSearchNextPayTime; |
||||
|
} |
||||
@ -0,0 +1,24 @@ |
|||||
|
package com.cyjd.rights.dto; |
||||
|
|
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Getter; |
||||
|
import lombok.Setter; |
||||
|
|
||||
|
import javax.validation.constraints.NotNull; |
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
|
||||
|
@Getter |
||||
|
@Setter |
||||
|
@ApiModel("分页参数接收类") |
||||
|
public class BasePageDto implements Serializable { |
||||
|
|
||||
|
@NotNull(message = "第几页不能为空!") |
||||
|
@ApiModelProperty(value="第几页") |
||||
|
private Integer pageNum; |
||||
|
|
||||
|
@NotNull(message = "每页条数不能为空!") |
||||
|
@ApiModelProperty(value="每页条数") |
||||
|
private Integer pageSize; |
||||
|
} |
||||
@ -0,0 +1,38 @@ |
|||||
|
package com.cyjd.rights.dto; |
||||
|
|
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.time.LocalDateTime; |
||||
|
|
||||
|
/** |
||||
|
* @author :WXC |
||||
|
* @Date :2023/05/16 |
||||
|
* @description : |
||||
|
*/ |
||||
|
@ApiModel(value = "权益领取") |
||||
|
@Data |
||||
|
public class RightsOrderDto extends BasePageDto{ |
||||
|
|
||||
|
|
||||
|
|
||||
|
@ApiModelProperty(value = "手机号") |
||||
|
private String mobile; |
||||
|
/** |
||||
|
* 0失败 1成功 2下单成功回调还没来 |
||||
|
*/ |
||||
|
@ApiModelProperty(value = "订单状态") |
||||
|
private String status; |
||||
|
|
||||
|
@ApiModelProperty(value = "查询开始时间") |
||||
|
private LocalDateTime beginTime; |
||||
|
|
||||
|
@ApiModelProperty(value = "查询结束时间") |
||||
|
private LocalDateTime endTime; |
||||
|
|
||||
|
@ApiModelProperty(value = "购买的产品编码") |
||||
|
private String productNumber; |
||||
|
|
||||
|
|
||||
|
} |
||||
@ -0,0 +1,23 @@ |
|||||
|
package com.cyjd.rights.dto; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
import lombok.EqualsAndHashCode; |
||||
|
import lombok.experimental.Accessors; |
||||
|
|
||||
|
import javax.validation.constraints.NotNull; |
||||
|
|
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper = false) |
||||
|
@Accessors(chain = true) |
||||
|
public class UpdateConfigDto { |
||||
|
/** |
||||
|
* 配置名字 |
||||
|
*/ |
||||
|
@NotNull(message = "配置名字不能为空!") |
||||
|
private String configName; |
||||
|
/** |
||||
|
* 配置值 |
||||
|
*/ |
||||
|
@NotNull(message = "配置值不能为空!") |
||||
|
private String configValue; |
||||
|
} |
||||
@ -0,0 +1,40 @@ |
|||||
|
package com.cyjd.rights.entity; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.IdType; |
||||
|
import com.baomidou.mybatisplus.annotation.TableId; |
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
import lombok.Data; |
||||
|
import lombok.EqualsAndHashCode; |
||||
|
import lombok.experimental.Accessors; |
||||
|
|
||||
|
import java.time.LocalDateTime; |
||||
|
|
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper = false) |
||||
|
@Accessors(chain = true) |
||||
|
@TableName("tb_link") |
||||
|
public class LinkEntity { |
||||
|
@TableId(value = "id", type = IdType.AUTO) |
||||
|
private Integer id; |
||||
|
/** |
||||
|
* 链接Id |
||||
|
*/ |
||||
|
private Integer linkId; |
||||
|
/** |
||||
|
* 链接名字 |
||||
|
*/ |
||||
|
private String linkName; |
||||
|
/** |
||||
|
* 所属的公司名字 |
||||
|
*/ |
||||
|
private String affiliationCompanyName; |
||||
|
|
||||
|
public LinkEntity(Integer linkId, String linkName, String affiliationCompanyName) { |
||||
|
this.linkId = linkId; |
||||
|
this.linkName = linkName; |
||||
|
this.affiliationCompanyName = affiliationCompanyName; |
||||
|
} |
||||
|
|
||||
|
public LinkEntity() { |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,39 @@ |
|||||
|
package com.cyjd.rights.vo; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
import lombok.EqualsAndHashCode; |
||||
|
import lombok.experimental.Accessors; |
||||
|
|
||||
|
import java.time.LocalDateTime; |
||||
|
|
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper = false) |
||||
|
@Accessors(chain = true) |
||||
|
public class AliPayOrderVo { |
||||
|
private Integer id; |
||||
|
|
||||
|
private String mobile; |
||||
|
|
||||
|
private LocalDateTime orderTime;//订单创建时间
|
||||
|
|
||||
|
private Integer status;//1 成功 0失败 2支付接口返回成功未收到回调
|
||||
|
|
||||
|
private String signCode;//支付宝签约号
|
||||
|
|
||||
|
private String price;//支付 价格
|
||||
|
|
||||
|
private String otherOrderId; //businessType为1时存的签约号
|
||||
|
|
||||
|
private String aliUserId;//用户支付宝唯一id
|
||||
|
|
||||
|
private LocalDateTime unsubTime; //退订时间
|
||||
|
|
||||
|
private Integer businessType; //1 权益类业务
|
||||
|
|
||||
|
private Integer linkId; |
||||
|
|
||||
|
|
||||
|
private String linkName; |
||||
|
|
||||
|
|
||||
|
} |
||||
@ -0,0 +1,39 @@ |
|||||
|
package com.cyjd.rights.vo; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
import lombok.EqualsAndHashCode; |
||||
|
import lombok.experimental.Accessors; |
||||
|
|
||||
|
import java.time.LocalDateTime; |
||||
|
|
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper = false) |
||||
|
@Accessors(chain = true) |
||||
|
public class AliPaySigningOrderVo { |
||||
|
private Integer id; |
||||
|
|
||||
|
private String mobile; |
||||
|
|
||||
|
private LocalDateTime orderTime;//订单创建时间
|
||||
|
|
||||
|
private Integer status;//1 成功 0失败 2发起签约成功
|
||||
|
|
||||
|
private String signCode;//支付宝签约号
|
||||
|
|
||||
|
private String price;//支付 价格
|
||||
|
|
||||
|
private String otherOrderId; //businessType为1时存的签约号
|
||||
|
|
||||
|
private String aliUserId;//用户支付宝唯一id
|
||||
|
|
||||
|
private LocalDateTime unsubTime; //退订时间
|
||||
|
|
||||
|
private Integer businessType; //1 权益类业务
|
||||
|
|
||||
|
private Integer linkId; |
||||
|
|
||||
|
|
||||
|
private String linkName; |
||||
|
|
||||
|
private LocalDateTime nextPayTime; //下次续费时间
|
||||
|
} |
||||
@ -0,0 +1,29 @@ |
|||||
|
package com.cyjd.rights.vo; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
import lombok.EqualsAndHashCode; |
||||
|
import lombok.experimental.Accessors; |
||||
|
|
||||
|
import java.time.LocalDateTime; |
||||
|
|
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper = false) |
||||
|
@Accessors(chain = true) |
||||
|
public class RightsOrderVo { |
||||
|
private Integer id; |
||||
|
|
||||
|
private String mobile; |
||||
|
|
||||
|
private LocalDateTime orderTime;//订单创建时间
|
||||
|
|
||||
|
private Integer status;//1 成功 0失败 2支付接口返回成功未收到回调
|
||||
|
|
||||
|
private String code; |
||||
|
|
||||
|
private String reason; |
||||
|
|
||||
|
private String rightsType; //权益类型
|
||||
|
|
||||
|
private String productNumber; //产品编码
|
||||
|
|
||||
|
} |
||||
@ -1,8 +1,13 @@ |
|||||
package com.cyjd.rights.business.service; |
package com.cyjd.rights.business.service; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import com.baomidou.mybatisplus.extension.service.IService; |
import com.baomidou.mybatisplus.extension.service.IService; |
||||
|
import com.cyjd.rights.dto.AliPayInOrderDto; |
||||
import com.cyjd.rights.entity.AliPayOrderEntity; |
import com.cyjd.rights.entity.AliPayOrderEntity; |
||||
|
import com.cyjd.rights.vo.AliPayOrderVo; |
||||
|
|
||||
public interface AliPayOrderService extends IService<AliPayOrderEntity> { |
public interface AliPayOrderService extends IService<AliPayOrderEntity> { |
||||
boolean checkOpen(String mobile); |
boolean checkOpen(String mobile); |
||||
|
|
||||
|
IPage<AliPayOrderVo> getPageOrder(AliPayInOrderDto dto); |
||||
} |
} |
||||
|
|||||
@ -0,0 +1,13 @@ |
|||||
|
package com.cyjd.rights.business.service; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.extension.service.IService; |
||||
|
import com.cyjd.rights.entity.LinkEntity; |
||||
|
|
||||
|
public interface LinkService extends IService<LinkEntity> { |
||||
|
/** |
||||
|
* 检查这个链接id是否已经被使用过了 |
||||
|
* @param linkId 链接id |
||||
|
* @return |
||||
|
*/ |
||||
|
boolean checkLinkId(Integer linkId); |
||||
|
} |
||||
@ -1,7 +1,14 @@ |
|||||
package com.cyjd.rights.business.service; |
package com.cyjd.rights.business.service; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import com.baomidou.mybatisplus.extension.service.IService; |
import com.baomidou.mybatisplus.extension.service.IService; |
||||
|
import com.cyjd.rights.dto.AliPaySignOrderDto; |
||||
|
import com.cyjd.rights.dto.RightsOrderDto; |
||||
import com.cyjd.rights.entity.RightsOrderEntity; |
import com.cyjd.rights.entity.RightsOrderEntity; |
||||
|
import com.cyjd.rights.vo.AliPaySigningOrderVo; |
||||
|
import com.cyjd.rights.vo.RightsOrderVo; |
||||
|
|
||||
public interface RightsOrderService extends IService<RightsOrderEntity> { |
public interface RightsOrderService extends IService<RightsOrderEntity> { |
||||
|
IPage<RightsOrderVo> getPageOrder(RightsOrderDto dto); |
||||
|
|
||||
} |
} |
||||
|
|||||
@ -1,7 +1,15 @@ |
|||||
package com.cyjd.rights.business.mapper; |
package com.cyjd.rights.business.mapper; |
||||
|
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
import com.cyjd.rights.dto.AliPayInOrderDto; |
||||
import com.cyjd.rights.entity.AliPayOrderEntity; |
import com.cyjd.rights.entity.AliPayOrderEntity; |
||||
|
import com.cyjd.rights.vo.AliPayOrderVo; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
public interface AliPayOrderMapper extends BaseMapper<AliPayOrderEntity> { |
public interface AliPayOrderMapper extends BaseMapper<AliPayOrderEntity> { |
||||
|
|
||||
|
List<AliPayOrderVo> getPageOrder(AliPayInOrderDto dto); |
||||
|
|
||||
|
void test(); |
||||
} |
} |
||||
|
|||||
@ -1,7 +1,13 @@ |
|||||
package com.cyjd.rights.business.mapper; |
package com.cyjd.rights.business.mapper; |
||||
|
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
import com.cyjd.rights.dto.AliPaySignOrderDto; |
||||
import com.cyjd.rights.entity.AliPaySigningOrderEntity; |
import com.cyjd.rights.entity.AliPaySigningOrderEntity; |
||||
|
import com.cyjd.rights.vo.AliPayOrderVo; |
||||
|
import com.cyjd.rights.vo.AliPaySigningOrderVo; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
public interface AliPaySigningOrderMapper extends BaseMapper<AliPaySigningOrderEntity> { |
public interface AliPaySigningOrderMapper extends BaseMapper<AliPaySigningOrderEntity> { |
||||
|
List<AliPaySigningOrderVo> getPageOrder(AliPaySignOrderDto dto); |
||||
} |
} |
||||
|
|||||
@ -0,0 +1,7 @@ |
|||||
|
package com.cyjd.rights.business.mapper; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
import com.cyjd.rights.entity.LinkEntity; |
||||
|
|
||||
|
public interface LinkMapper extends BaseMapper<LinkEntity> { |
||||
|
} |
||||
@ -1,8 +1,13 @@ |
|||||
package com.cyjd.rights.business.mapper; |
package com.cyjd.rights.business.mapper; |
||||
|
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
import com.cyjd.rights.dto.RightsOrderDto; |
||||
import com.cyjd.rights.entity.AliPayOrderEntity; |
import com.cyjd.rights.entity.AliPayOrderEntity; |
||||
import com.cyjd.rights.entity.RightsOrderEntity; |
import com.cyjd.rights.entity.RightsOrderEntity; |
||||
|
import com.cyjd.rights.vo.RightsOrderVo; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
public interface RightsOrderMapper extends BaseMapper<RightsOrderEntity> { |
public interface RightsOrderMapper extends BaseMapper<RightsOrderEntity> { |
||||
|
List<RightsOrderVo> getPageOrder(RightsOrderDto dto); |
||||
} |
} |
||||
|
|||||
@ -1,21 +1,43 @@ |
|||||
package com.cyjd.rights.business.service.impl; |
package com.cyjd.rights.business.service.impl; |
||||
|
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
import com.baomidou.mybatisplus.extension.service.IService; |
import com.baomidou.mybatisplus.extension.service.IService; |
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
|
import com.cyjd.rights.business.mapper.AliPayOrderMapper; |
||||
import com.cyjd.rights.business.mapper.AliPaySigningOrderMapper; |
import com.cyjd.rights.business.mapper.AliPaySigningOrderMapper; |
||||
import com.cyjd.rights.business.service.AliPaySigningOrderService; |
import com.cyjd.rights.business.service.AliPaySigningOrderService; |
||||
|
import com.cyjd.rights.dto.AliPaySignOrderDto; |
||||
import com.cyjd.rights.entity.AliPaySigningOrderEntity; |
import com.cyjd.rights.entity.AliPaySigningOrderEntity; |
||||
|
import com.cyjd.rights.vo.AliPayOrderVo; |
||||
|
import com.cyjd.rights.vo.AliPaySigningOrderVo; |
||||
|
import com.github.pagehelper.PageHelper; |
||||
|
import com.github.pagehelper.PageInfo; |
||||
import lombok.extern.java.Log; |
import lombok.extern.java.Log; |
||||
import org.springframework.stereotype.Service; |
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
import javax.annotation.Resource; |
||||
|
import java.util.List; |
||||
|
|
||||
@Service |
@Service |
||||
@Log |
@Log |
||||
public class AliPaySigningOrderImpl extends ServiceImpl<AliPaySigningOrderMapper, AliPaySigningOrderEntity> implements AliPaySigningOrderService { |
public class AliPaySigningOrderImpl extends ServiceImpl<AliPaySigningOrderMapper, AliPaySigningOrderEntity> implements AliPaySigningOrderService { |
||||
|
@Resource |
||||
|
private AliPaySigningOrderMapper aliPaySigningOrderMapper; |
||||
@Override |
@Override |
||||
public Boolean checkSigningStatus(String mobile) { |
public Boolean checkSigningStatus(String mobile) { |
||||
AliPaySigningOrderEntity paySigningOrderEntity = this.getOne(new QueryWrapper<AliPaySigningOrderEntity>().eq("mobile", mobile).orderByDesc("order_time")); |
AliPaySigningOrderEntity paySigningOrderEntity = this.getOne(new QueryWrapper<AliPaySigningOrderEntity>().eq("mobile", mobile).orderByDesc("order_time")); |
||||
//paySigningOrderEntity.get
|
//paySigningOrderEntity.get
|
||||
return null; |
return null; |
||||
} |
} |
||||
|
|
||||
|
@Override |
||||
|
public IPage<AliPaySigningOrderVo> getPageOrder(AliPaySignOrderDto dto) { |
||||
|
PageHelper.startPage(dto.getPageNum(), dto.getPageSize()); |
||||
|
List<AliPaySigningOrderVo> pageOrder = aliPaySigningOrderMapper.getPageOrder(dto); |
||||
|
IPage<AliPaySigningOrderVo> page=new Page<>(dto.getPageNum(),dto.getPageSize(),new PageInfo(pageOrder).getTotal()); |
||||
|
page.setRecords(pageOrder); |
||||
|
return page; |
||||
|
} |
||||
} |
} |
||||
|
|||||
@ -0,0 +1,25 @@ |
|||||
|
package com.cyjd.rights.business.service.impl; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
|
import com.cyjd.rights.business.mapper.AliPaySigningOrderMapper; |
||||
|
import com.cyjd.rights.business.mapper.LinkMapper; |
||||
|
import com.cyjd.rights.business.service.AliPaySigningOrderService; |
||||
|
import com.cyjd.rights.business.service.LinkService; |
||||
|
import com.cyjd.rights.entity.AliPaySigningOrderEntity; |
||||
|
import com.cyjd.rights.entity.LinkEntity; |
||||
|
import lombok.extern.java.Log; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
@Service |
||||
|
@Log |
||||
|
public class LinkServiceImpl extends ServiceImpl<LinkMapper, LinkEntity> implements LinkService { |
||||
|
@Override |
||||
|
public boolean checkLinkId(Integer linkId) { |
||||
|
int count = this.count(new QueryWrapper<LinkEntity>().eq("link_id", linkId)); |
||||
|
if (count>0){ |
||||
|
return false; |
||||
|
} |
||||
|
return true; |
||||
|
} |
||||
|
} |
||||
@ -1,14 +1,34 @@ |
|||||
package com.cyjd.rights.business.service.impl; |
package com.cyjd.rights.business.service.impl; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
import com.cyjd.rights.business.mapper.RightsOrderMapper; |
import com.cyjd.rights.business.mapper.RightsOrderMapper; |
||||
import com.cyjd.rights.business.service.RightsOrderService; |
import com.cyjd.rights.business.service.RightsOrderService; |
||||
|
import com.cyjd.rights.dto.RightsOrderDto; |
||||
import com.cyjd.rights.entity.RightsOrderEntity; |
import com.cyjd.rights.entity.RightsOrderEntity; |
||||
|
import com.cyjd.rights.vo.AliPaySigningOrderVo; |
||||
|
import com.cyjd.rights.vo.RightsOrderVo; |
||||
|
import com.github.pagehelper.PageHelper; |
||||
|
import com.github.pagehelper.PageInfo; |
||||
import lombok.extern.java.Log; |
import lombok.extern.java.Log; |
||||
import lombok.extern.slf4j.Slf4j; |
import lombok.extern.slf4j.Slf4j; |
||||
import org.springframework.stereotype.Service; |
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
import javax.annotation.Resource; |
||||
|
import java.util.List; |
||||
|
|
||||
@Service |
@Service |
||||
@Log |
@Log |
||||
public class RightsOrderServiceImpl extends ServiceImpl<RightsOrderMapper, RightsOrderEntity> implements RightsOrderService { |
public class RightsOrderServiceImpl extends ServiceImpl<RightsOrderMapper, RightsOrderEntity> implements RightsOrderService { |
||||
|
@Resource |
||||
|
private RightsOrderMapper rightsOrderMapper; |
||||
|
@Override |
||||
|
public IPage<RightsOrderVo> getPageOrder(RightsOrderDto dto) { |
||||
|
PageHelper.startPage(dto.getPageNum(), dto.getPageSize()); |
||||
|
List<RightsOrderVo> pageOrder = rightsOrderMapper.getPageOrder(dto); |
||||
|
IPage<RightsOrderVo> page=new Page<>(dto.getPageNum(),dto.getPageSize(),new PageInfo(pageOrder).getTotal()); |
||||
|
page.setRecords(pageOrder); |
||||
|
return page; |
||||
|
} |
||||
} |
} |
||||
|
|||||
@ -0,0 +1,31 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
|
<mapper namespace="com.cyjd.rights.business.mapper.AliPayOrderMapper"> |
||||
|
<select id="getPageOrder" resultType="com.cyjd.rights.vo.AliPayOrderVo"> |
||||
|
select |
||||
|
id,mobile,order_time,status,sign_code,price,other_order_id,ali_user_id,unsub_time,business_type,link_id |
||||
|
from tb_ali_pay_order |
||||
|
<where> |
||||
|
1=1 |
||||
|
<if test="outTradeNo!=null and outTradeNo!=''"> |
||||
|
and other_order_id = #{outTradeNo} |
||||
|
</if> |
||||
|
<if test="linkId!=null and linkId!=''"> |
||||
|
and link_id = #{linkId} |
||||
|
</if> |
||||
|
<if test="linkName!=null and linkName!=''"> |
||||
|
and link_name = #{linkName} |
||||
|
</if> |
||||
|
<if test="status!=null and status!=''"> |
||||
|
and status = #{status} |
||||
|
</if> |
||||
|
<if test="beginTime!=null"> |
||||
|
and order_time > #{beginTime} |
||||
|
</if> |
||||
|
<if test="endTime!=null"> |
||||
|
and order_time < #{beginTime} |
||||
|
</if> |
||||
|
</where> |
||||
|
</select> |
||||
|
<select id="test"></select> |
||||
|
</mapper> |
||||
@ -0,0 +1,36 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
|
<mapper namespace="com.cyjd.rights.business.mapper.AliPaySigningOrderMapper"> |
||||
|
<select id="getPageOrder" resultType="com.cyjd.rights.vo.AliPaySigningOrderVo"> |
||||
|
select |
||||
|
id,mobile,order_time,status,sign_code,price,other_order_id,ali_user_id,unsub_time,business_type,link_id,next_pay_time |
||||
|
from tb_ali_pay_signing_order |
||||
|
<where> |
||||
|
1=1 |
||||
|
<if test="outTradeNo!=null and outTradeNo!=''"> |
||||
|
and other_order_id = #{outTradeNo} |
||||
|
</if> |
||||
|
<if test="linkId!=null and linkId!=''"> |
||||
|
and link_id = #{linkId} |
||||
|
</if> |
||||
|
<if test="linkName!=null and linkName!=''"> |
||||
|
and link_name = #{linkName} |
||||
|
</if> |
||||
|
<if test="status!=null and status!=''"> |
||||
|
and status = #{status} |
||||
|
</if> |
||||
|
<if test="beginTime!=null"> |
||||
|
and order_time > #{beginTime} |
||||
|
</if> |
||||
|
<if test="endTime!=null"> |
||||
|
and order_time < #{endTime} |
||||
|
</if> |
||||
|
<if test="beginSearchNextPayTime!=null"> |
||||
|
and next_pay_time > #{beginSearchNextPayTime} |
||||
|
</if> |
||||
|
<if test="endSearchNextPayTime!=null"> |
||||
|
and next_pay_time < #{endSearchNextPayTime} |
||||
|
</if> |
||||
|
</where> |
||||
|
</select> |
||||
|
</mapper> |
||||
@ -0,0 +1,27 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
|
<mapper namespace="com.cyjd.rights.business.mapper.RightsOrderMapper"> |
||||
|
<select id="getPageOrder" resultType="com.cyjd.rights.vo.RightsOrderVo"> |
||||
|
select |
||||
|
id,mobile,order_time,status,code,reason,rights_type,product_number |
||||
|
from tb_rights_order |
||||
|
<where> |
||||
|
1=1 |
||||
|
<if test="productNumber!=null and productNumber!=''"> |
||||
|
and product_number = #{productNumber} |
||||
|
</if> |
||||
|
<if test="mobile!=null and mobile!=''"> |
||||
|
and mobile = #{mobile} |
||||
|
</if> |
||||
|
<if test="status!=null and status!=''"> |
||||
|
and status = #{status} |
||||
|
</if> |
||||
|
<if test="beginTime!=null"> |
||||
|
and order_time > #{beginTime} |
||||
|
</if> |
||||
|
<if test="endTime!=null"> |
||||
|
and order_time < #{beginTime} |
||||
|
</if> |
||||
|
</where> |
||||
|
</select> |
||||
|
</mapper> |
||||
Loading…
Reference in new issue