diff --git a/mallinkAdmin/src/main/java/com/simple/controller/WxCouponVerifyController.java b/mallinkAdmin/src/main/java/com/simple/controller/WxCouponVerifyController.java deleted file mode 100644 index 9e778e87e..000000000 --- a/mallinkAdmin/src/main/java/com/simple/controller/WxCouponVerifyController.java +++ /dev/null @@ -1,82 +0,0 @@ -package com.simple.controller; - -import com.simple.domain.po.MallUserInfo; -import org.apache.log4j.Logger; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.util.Assert; -import org.springframework.web.bind.annotation.*; - -import com.github.pagehelper.PageInfo; -import com.simple.common.Result; -import com.simple.common.ResultData; - -import com.simple.domain.po.WxCouponVerify; -import com.simple.service.WxCouponVerifyService; -import io.swagger.annotations.ApiImplicitParam; -import io.swagger.annotations.ApiImplicitParams; -import io.swagger.annotations.ApiOperation; - -@RestController -@RequestMapping("wxCouponVerify") -public class WxCouponVerifyController extends BaseController -{ - @Autowired - private WxCouponVerifyService wxCouponVerifyService; - - private Logger logger = Logger.getLogger(WxCouponVerifyController.class); - - @ApiOperation("分页列表接口") - @GetMapping("list") - @ApiImplicitParams({ - @ApiImplicitParam(name="pageNum",value="页数",dataType="int", paramType = "query",required=true), - @ApiImplicitParam(name="pageSize",value="每页条数",dataType="int", paramType = "query",required=true)}) - public ResultData list(@ModelAttribute WxCouponVerify wxCouponVerify,Integer pageNum, Integer pageSize) { - if (null == wxCouponVerify) wxCouponVerify = new WxCouponVerify(); - final PageInfo page = wxCouponVerifyService.listAsPage(wxCouponVerify, pageNum, pageSize); - return new ResultData(page); - } - - @ApiOperation("新增接口") - @PostMapping("add") - public ResultData add(@RequestBody WxCouponVerify wxCouponVerify) { - //Assert.notNull(wxCouponVerify.getName(), "角色名不能为空"); - //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); - wxCouponVerifyService.saveOrUpdate(wxCouponVerify); - return new ResultData(); - } - - @ApiOperation("根据id更新接口") - @PostMapping("update") - public ResultData update(@RequestBody WxCouponVerify wxCouponVerify) { - wxCouponVerifyService.saveOrUpdate(wxCouponVerify); - return new ResultData(); - } - - @ApiOperation("根据id删除接口") - @GetMapping("/del") - @ApiImplicitParam(name="id",value="id",dataType="Long", paramType = "query",required=true) - public ResultData delete(Long id) { - wxCouponVerifyService.deleteById(id); - return new ResultData(Result.SUCCESS, "删除成功", null); - } - - @ApiOperation("根据id查询接口") - @GetMapping("/findById") - @ApiImplicitParam(name="id",value="id",dataType="Long", paramType = "query",required=true) - public ResultData findById(Long id) { - return new ResultData(Result.SUCCESS,"查询成功",wxCouponVerifyService.getById(id)); - } - - @ApiOperation("根据id更新接口") - @PostMapping("verify") - public ResultData verify(@RequestBody WxCouponVerify wxCouponVerify) { - MallUserInfo user =getUser(); - wxCouponVerify.setBUserId(user.getId()); - wxCouponVerify.setTenantId(user.getTenantId()); - wxCouponVerifyService.saveOrUpdate(wxCouponVerify); - return new ResultData(); - } - - - -} diff --git a/mallinkCApi/src/main/java/com/simple/controller/WxCouponController.java b/mallinkCApi/src/main/java/com/simple/controller/WxCouponController.java index 263c602c3..f51961810 100644 --- a/mallinkCApi/src/main/java/com/simple/controller/WxCouponController.java +++ b/mallinkCApi/src/main/java/com/simple/controller/WxCouponController.java @@ -42,5 +42,4 @@ public class WxCouponController extends BaseController { return new ResultData(Result.SUCCESS, "查询成功", wxCouponService.getById(id)); } - } diff --git a/mallinkCApi/src/main/java/com/simple/controller/WxCouponVerifyController.java b/mallinkCApi/src/main/java/com/simple/controller/WxCouponVerifyController.java deleted file mode 100644 index 95b91de39..000000000 --- a/mallinkCApi/src/main/java/com/simple/controller/WxCouponVerifyController.java +++ /dev/null @@ -1,71 +0,0 @@ -package com.simple.controller; - -import org.apache.log4j.Logger; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.util.Assert; -import org.springframework.web.bind.annotation.*; - -import com.github.pagehelper.PageInfo; -import com.simple.common.Result; -import com.simple.common.ResultData; - -import com.simple.domain.po.WxCouponVerify; -import com.simple.service.WxCouponVerifyService; -import io.swagger.annotations.ApiImplicitParam; -import io.swagger.annotations.ApiImplicitParams; -import io.swagger.annotations.ApiOperation; - -@RestController -@RequestMapping("wxCouponVerify") -public class WxCouponVerifyController extends BaseController -{ - @Autowired - private WxCouponVerifyService wxCouponVerifyService; - - private Logger logger = Logger.getLogger(WxCouponVerifyController.class); - - @ApiOperation("分页列表接口") - @GetMapping("list") - @ApiImplicitParams({ - @ApiImplicitParam(name="pageNum",value="页数",dataType="int", paramType = "query",required=true), - @ApiImplicitParam(name="pageSize",value="每页条数",dataType="int", paramType = "query",required=true)}) - public ResultData list(@ModelAttribute WxCouponVerify wxCouponVerify,Integer pageNum, Integer pageSize) { - if (null == wxCouponVerify) wxCouponVerify = new WxCouponVerify(); - final PageInfo page = wxCouponVerifyService.listAsPage(wxCouponVerify, pageNum, pageSize); - return new ResultData(page); - } - - @ApiOperation("新增接口") - @PostMapping("add") - public ResultData add(@RequestBody WxCouponVerify wxCouponVerify) { - //Assert.notNull(wxCouponVerify.getName(), "角色名不能为空"); - //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); - wxCouponVerifyService.saveOrUpdate(wxCouponVerify); - return new ResultData(); - } - - @ApiOperation("根据id更新接口") - @PostMapping("update") - public ResultData update(@RequestBody WxCouponVerify wxCouponVerify) { - wxCouponVerifyService.saveOrUpdate(wxCouponVerify); - return new ResultData(); - } - - @ApiOperation("根据id删除接口") - @GetMapping("/del") - @ApiImplicitParam(name="id",value="id",dataType="Long", paramType = "query",required=true) - public ResultData delete(Long id) { - wxCouponVerifyService.deleteById(id); - return new ResultData(Result.SUCCESS, "删除成功", null); - } - - @ApiOperation("根据id查询接口") - @GetMapping("/findById") - @ApiImplicitParam(name="id",value="id",dataType="Long", paramType = "query",required=true) - public ResultData findById(Long id) { - return new ResultData(Result.SUCCESS,"查询成功",wxCouponVerifyService.getById(id)); - } - - - -} diff --git a/mallinkService/src/main/java/com/simple/domain/po/WxCouponVerify.java b/mallinkService/src/main/java/com/simple/domain/po/WxCouponVerify.java deleted file mode 100644 index 12f6d48f5..000000000 --- a/mallinkService/src/main/java/com/simple/domain/po/WxCouponVerify.java +++ /dev/null @@ -1,201 +0,0 @@ -package com.simple.domain.po; - -import javax.persistence.*; -import java.util.*; -import java.math.*; -import javax.persistence.Transient; -import java.util.List; -import javax.persistence.Id; -import java.io.Serializable; - -@Table(name = "wx_coupon_verify") -public class WxCouponVerify implements Serializable { - private static final long serialVersionUID = 1L; - - @Id - protected Long id; - - @Transient - protected List ids; - @Transient - protected String sortColumns; - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public String getSortColumns() { - return sortColumns; - } - - public List getIds() { - return ids; - } - public void setIds(List ids) { - this.ids = ids; - } - - - - /*租户ID**/ - @io.swagger.annotations.ApiModelProperty(value="租户ID",name="tenantId") - private String tenantId; - /*coupon id**/ - @io.swagger.annotations.ApiModelProperty(value="coupon id",name="couponId") - private Long couponId; - /*订单id**/ - @io.swagger.annotations.ApiModelProperty(value="订单id",name="orderId") - private Long orderId; - /*c端用户id**/ - @io.swagger.annotations.ApiModelProperty(value="c端用户id",name="cUserId") - private Long cUserId; - /*购买日期/领取日期**/ - @io.swagger.annotations.ApiModelProperty(value="购买日期/领取日期",name="buyDate") - private Date buyDate; - /*截止日期**/ - @io.swagger.annotations.ApiModelProperty(value="截止日期",name="limitDate") - private Date limitDate; - /*c状态(0:default,1:未支付,2:已支付/已领取,3:已使用,4:已退回/已退券)**/ - @io.swagger.annotations.ApiModelProperty(value="c状态(0:default,1:未支付,2:已支付/已领取,3:已使用,4:已退回/已退券)",name="cStatus") - private Integer cStatus; - /*b端用户id**/ - @io.swagger.annotations.ApiModelProperty(value="b端用户id",name="bUserId") - private Long bUserId; - /*核销日期**/ - @io.swagger.annotations.ApiModelProperty(value="核销日期",name="verificationDate") - private Date verificationDate; - /*核销状态(0:未核销,1:已核销)**/ - @io.swagger.annotations.ApiModelProperty(value="核销状态(0:未核销,1:已核销)",name="verificationStatus") - private Integer verificationStatus; - public String getTenantId() { - return tenantId; - } - public void setTenantId(String _tenantId) { - tenantId = _tenantId; - } - public Long getCouponId() { - return couponId; - } - public void setCouponId(Long _couponId) { - couponId = _couponId; - } - public Long getOrderId() { - return orderId; - } - public void setOrderId(Long _orderId) { - orderId = _orderId; - } - public Long getCUserId() { - return cUserId; - } - public void setCUserId(Long _cUserId) { - cUserId = _cUserId; - } - public Date getBuyDate() { - return buyDate; - } - public void setBuyDate(Date _buyDate) { - buyDate = _buyDate; - } - public Date getLimitDate() { - return limitDate; - } - public void setLimitDate(Date _limitDate) { - limitDate = _limitDate; - } - public Integer getCStatus() { - return cStatus; - } - public void setCStatus(Integer _cStatus) { - cStatus = _cStatus; - } - public Long getBUserId() { - return bUserId; - } - public void setBUserId(Long _bUserId) { - bUserId = _bUserId; - } - public Date getVerificationDate() { - return verificationDate; - } - public void setVerificationDate(Date _verificationDate) { - verificationDate = _verificationDate; - } - public Integer getVerificationStatus() { - return verificationStatus; - } - public void setVerificationStatus(Integer _verificationStatus) { - verificationStatus = _verificationStatus; - } - - - - public static enum Field - { - Id_ASC("`id` ASC"),Id_DESC("`id` DESC") - ,TenantId_ASC("`tenantId` ASC"),TenantId_DESC("`tenantId` DESC") - ,CouponId_ASC("`couponId` ASC"),CouponId_DESC("`couponId` DESC") - ,OrderId_ASC("`orderId` ASC"),OrderId_DESC("`orderId` DESC") - ,CUserId_ASC("`cUserId` ASC"),CUserId_DESC("`cUserId` DESC") - ,BuyDate_ASC("`buyDate` ASC"),BuyDate_DESC("`buyDate` DESC") - ,LimitDate_ASC("`limitDate` ASC"),LimitDate_DESC("`limitDate` DESC") - ,CStatus_ASC("`cStatus` ASC"),CStatus_DESC("`cStatus` DESC") - ,BUserId_ASC("`bUserId` ASC"),BUserId_DESC("`bUserId` DESC") - ,VerificationDate_ASC("`verificationDate` ASC"),VerificationDate_DESC("`verificationDate` DESC") - ,VerificationStatus_ASC("`verificationStatus` ASC"),VerificationStatus_DESC("`verificationStatus` DESC") - ; - private String value; - Field(String value){ - this.value = value; - } - public String getValue() { - return value; - } - public void setCol(String value) { - this.value = value; - } - @Override - public String toString() { - return this.getValue(); - } - } - - public void setSortColumns(WxCouponVerify.Field... fields) - { - if (fields == null || fields.length == 0) { - return; - } - for (int k = 0; k < fields.length; k++) { - if (fields[k] == null) { - return; - } - } - StringBuilder sb = new StringBuilder(fields[0].toString()); - for (int k = 1; k < fields.length; k++) { - sb.append(","); - sb.append(fields[k].toString()); - } - - } - - public void setSortColumns(String sortColumns) - { - if (sortColumns == null || "".equals(sortColumns.trim())) { - return; - } - if (sortColumns.contains(",")) { - String[] cols = sortColumns.split(","); - java.util.List fList = new java.util.ArrayList(); - for (int k = 0; k < cols.length; k++) { - fList.add(Field.valueOf(cols[k])); - } - this.setSortColumns(fList.toArray(new Field[fList.size()])); - } else { - this.setSortColumns(Field.valueOf(sortColumns)); - } - } -} diff --git a/mallinkService/src/main/java/com/simple/mapper/WxCouponVerifyMapper.java b/mallinkService/src/main/java/com/simple/mapper/WxCouponVerifyMapper.java deleted file mode 100644 index 01786d1ee..000000000 --- a/mallinkService/src/main/java/com/simple/mapper/WxCouponVerifyMapper.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.simple.mapper; - -import java.util.*; -import com.simple.common.CommonMapper; -import org.apache.ibatis.annotations.Param; -import com.simple.domain.po.WxCouponVerify; - -public interface WxCouponVerifyMapper extends CommonMapper { - - List findList(WxCouponVerify wxCouponVerify); - - - - - - -} diff --git a/mallinkService/src/main/java/com/simple/service/WxCouponVerifyService.java b/mallinkService/src/main/java/com/simple/service/WxCouponVerifyService.java deleted file mode 100644 index 03b371e26..000000000 --- a/mallinkService/src/main/java/com/simple/service/WxCouponVerifyService.java +++ /dev/null @@ -1,48 +0,0 @@ -package com.simple.service; - -import java.util.*; -import com.github.pagehelper.PageInfo; -import com.simple.domain.po.WxCouponVerify; - -public interface WxCouponVerifyService { - - /** - * 根据实体查询分页列表 - * - * @param record - * @param offset - * @param limit - * @return - */ - PageInfo listAsPage(WxCouponVerify record, Integer pageIndex, Integer pageSize); - - /** - * 根据Id获得实体 - * - * @param id - * @return - */ - WxCouponVerify getById(Long id); - - /** - * 保存或更新实体 - * - * @param record - */ - void saveOrUpdate(WxCouponVerify record); - - /** - * 根据Id删除实体 - * - * @param id - */ - void deleteById(Long id); - - - - - - - - -} diff --git a/mallinkService/src/main/java/com/simple/service/impl/WxCouponVerifyServiceImpl.java b/mallinkService/src/main/java/com/simple/service/impl/WxCouponVerifyServiceImpl.java deleted file mode 100644 index 3ab97542a..000000000 --- a/mallinkService/src/main/java/com/simple/service/impl/WxCouponVerifyServiceImpl.java +++ /dev/null @@ -1,54 +0,0 @@ -package com.simple.service.impl; - -import java.util.*; -import com.github.pagehelper.PageHelper; -import com.github.pagehelper.PageInfo; -import com.simple.domain.po.WxCouponVerify; -import com.simple.mapper.WxCouponVerifyMapper; -import com.simple.service.WxCouponVerifyService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import com.simple.common.IdWorker; - -@Service -public class WxCouponVerifyServiceImpl implements WxCouponVerifyService { - - @Autowired - WxCouponVerifyMapper wxCouponVerifyMapper; - - - @Override - public PageInfo listAsPage(WxCouponVerify record, Integer pageIndex, Integer pageSize) { - return PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxCouponVerifyMapper.findList(record)); - } - - @Override - public WxCouponVerify getById(Long id) { - return wxCouponVerifyMapper.selectByPrimaryKey(id); - } - - @Override - public void saveOrUpdate(WxCouponVerify record) { - if (record.getId() == null) { - //record.setId(UUID.randomUUID().toString().replaceAll("-", "")); - final IdWorker idWorker = IdWorker.get(); - record.setId(idWorker.nextId()); - wxCouponVerifyMapper.insertSelective(record); - } else { - wxCouponVerifyMapper.updateByPrimaryKeySelective(record); - } - } - - @Override - public void deleteById(Long id) { - wxCouponVerifyMapper.deleteByPrimaryKey(id); - } - - - - - - - - -} diff --git a/mallinkService/src/main/java/com/simple/service/impl/WxRefundOrderServiceImpl.java b/mallinkService/src/main/java/com/simple/service/impl/WxRefundOrderServiceImpl.java index 4731a8889..053739db5 100644 --- a/mallinkService/src/main/java/com/simple/service/impl/WxRefundOrderServiceImpl.java +++ b/mallinkService/src/main/java/com/simple/service/impl/WxRefundOrderServiceImpl.java @@ -41,9 +41,6 @@ public class WxRefundOrderServiceImpl implements WxRefundOrderService { @Autowired WxRefundOrderMapper wxRefundOrderMapper; - @Autowired - WxCouponVerifyMapper wxCouponVerifyMapper; - @Autowired WxOrderMapper wxOrderMapper; diff --git a/mallinkService/src/main/resources/mapper/WxCouponVerifyMapper.xml b/mallinkService/src/main/resources/mapper/WxCouponVerifyMapper.xml deleted file mode 100644 index ef79ffe66..000000000 --- a/mallinkService/src/main/resources/mapper/WxCouponVerifyMapper.xml +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - - - - - - - - - - - - - `id`,`tenant_id`,`coupon_id`,`order_id`,`c_user_id`,`buy_date`,`limit_date`,`c_status`,`b_user_id`,`verification_date`,`verification_status` - - - - where 1 = 1 - - - and `id` = #{id} - - - - - and `tenant_id` like concat('%', #{tenantId},'%') - - - - - and `coupon_id` = #{couponId} - - - - - and `order_id` = #{orderId} - - - - - and `c_user_id` = #{cUserId} - - - - - and `buy_date` = #{buyDate} - - - - - and `limit_date` = #{limitDate} - - - - - and `c_status` = #{cStatus} - - - - - and `b_user_id` = #{bUserId} - - - - - and `verification_date` = #{verificationDate} - - - - - and `verification_status` = #{verificationStatus} - - - - and id in - - #{idItem} - - - order by ${sortColumns} - - - - - - - - - -