10 changed files with 1568 additions and 30 deletions
@ -0,0 +1,112 @@ |
|||
package cc.hiver.mall.controller; |
|||
|
|||
import cc.hiver.core.common.utils.ResultUtil; |
|||
import cc.hiver.core.common.vo.Result; |
|||
import cc.hiver.mall.entity.ReturnCommission; |
|||
import cc.hiver.mall.entity.Shop; |
|||
import cc.hiver.mall.service.ShopService; |
|||
import cc.hiver.mall.service.mybatis.ReturnCommissionService; |
|||
import cc.hiver.mall.utils.AliPayUtil; |
|||
import com.alipay.api.AlipayApiException; |
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.transaction.annotation.Transactional; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RequestMethod; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
import java.util.List; |
|||
|
|||
@Slf4j |
|||
@RestController |
|||
@Api(tags = "店铺返佣接口") |
|||
@RequestMapping(value = "/hiver/app/returnCommission/") |
|||
@Transactional |
|||
public class ReturnCommissionController { |
|||
@Autowired |
|||
private ReturnCommissionService returnCommissionService; |
|||
|
|||
@Autowired |
|||
private ShopService shopService; |
|||
|
|||
@RequestMapping(value = "/save", method = RequestMethod.POST) |
|||
@ApiOperation(value = "新增店铺返佣") |
|||
public Result save(ReturnCommission returnCommission) { |
|||
boolean result = returnCommissionService.save(returnCommission); |
|||
if(result) { |
|||
return ResultUtil.success("添加成功"); |
|||
} else { |
|||
return ResultUtil.error("添加失败"); |
|||
} |
|||
} |
|||
|
|||
@RequestMapping(value = "/edit", method = RequestMethod.POST) |
|||
@ApiOperation(value = "根据id修改") |
|||
public Result edit(ReturnCommission returnCommission) { |
|||
boolean result = returnCommissionService.updateById(returnCommission); |
|||
if(result) { |
|||
return ResultUtil.success("修改成功"); |
|||
} else { |
|||
return ResultUtil.error("修改失败"); |
|||
} |
|||
} |
|||
|
|||
@RequestMapping(value = "/delById", method = RequestMethod.POST) |
|||
@ApiOperation(value = "根据id删除") |
|||
public Result delete(ReturnCommission returnCommission) { |
|||
boolean result = returnCommissionService.removeById(returnCommission); |
|||
if(result) { |
|||
return ResultUtil.success("删除成功"); |
|||
} else { |
|||
return ResultUtil.error("删除失败"); |
|||
} |
|||
} |
|||
|
|||
@RequestMapping(value = "/list", method = RequestMethod.GET) |
|||
@ApiOperation(value = "查询全部") |
|||
public Result list() { |
|||
QueryWrapper<ReturnCommission> queryWrapper = new QueryWrapper<>(); |
|||
List<ReturnCommission> list = returnCommissionService.list(queryWrapper); |
|||
return new ResultUtil<List<ReturnCommission>>().setData(list); |
|||
} |
|||
|
|||
@Transactional |
|||
@RequestMapping(value = "/handleReturn", method = RequestMethod.POST) |
|||
@ApiOperation(value = "返佣处理") |
|||
public Result handleReturn(String id) { |
|||
|
|||
boolean result = false; |
|||
String aliResult = ""; |
|||
UpdateWrapper<ReturnCommission> refuseWrapper = new UpdateWrapper<>(); |
|||
refuseWrapper.eq("id",id); |
|||
//1.支付宝转至对方账户
|
|||
ReturnCommission returnCommission = returnCommissionService.getById(id); |
|||
QueryWrapper<Shop> shopQueryWrapper = new QueryWrapper<>(); |
|||
Shop shop = shopService.get(returnCommission.getShopId()); |
|||
String name = shop.getAliName();//支付宝户名(姓名)
|
|||
String phoneNumber = shop.getAliAccount();//支付宝账号(手机号)
|
|||
try { |
|||
com.alipay.api.domain.Result payResult = AliPayUtil.pay(phoneNumber, name, returnCommission.getCommission().toString(), id); |
|||
refuseWrapper.set("status","1"); |
|||
aliResult = "支付宝转账成功"; |
|||
} catch (AlipayApiException e) { |
|||
refuseWrapper.set("status","2"); |
|||
refuseWrapper.set("fail_message","支付宝转账失败"); |
|||
refuseWrapper.set("remark",e.getErrMsg()); |
|||
aliResult = "支付宝转账失败"; |
|||
} |
|||
//2.修改返佣记录
|
|||
result = returnCommissionService.update(refuseWrapper); |
|||
if(result) { |
|||
return ResultUtil.success("处理完成," + aliResult); |
|||
} else { |
|||
return ResultUtil.error("修改返佣数据失败," + aliResult); |
|||
} |
|||
|
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,33 @@ |
|||
package cc.hiver.mall.dao.mapper; |
|||
|
|||
import cc.hiver.mall.entity.ReturnCommission; |
|||
import cc.hiver.mall.entity.ReturnCommissionExample; |
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
import org.springframework.stereotype.Repository; |
|||
|
|||
import java.util.List; |
|||
@Repository |
|||
public interface ReturnCommissionMapper extends BaseMapper<ReturnCommission> { |
|||
long countByExample(ReturnCommissionExample example); |
|||
|
|||
int deleteByExample(ReturnCommissionExample example); |
|||
|
|||
int deleteByPrimaryKey(String id); |
|||
|
|||
int insert(ReturnCommission record); |
|||
|
|||
int insertSelective(ReturnCommission record); |
|||
|
|||
List<ReturnCommission> selectByExample(ReturnCommissionExample example); |
|||
|
|||
ReturnCommission selectByPrimaryKey(String id); |
|||
|
|||
int updateByExampleSelective(@Param("record") ReturnCommission record, @Param("example") ReturnCommissionExample example); |
|||
|
|||
int updateByExample(@Param("record") ReturnCommission record, @Param("example") ReturnCommissionExample example); |
|||
|
|||
int updateByPrimaryKeySelective(ReturnCommission record); |
|||
|
|||
int updateByPrimaryKey(ReturnCommission record); |
|||
} |
|||
@ -0,0 +1,153 @@ |
|||
package cc.hiver.mall.entity; |
|||
|
|||
import cc.hiver.core.common.utils.SnowFlakeUtil; |
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
|
|||
import java.io.Serializable; |
|||
import java.math.BigDecimal; |
|||
import java.util.Date; |
|||
|
|||
@ApiModel(value = "店铺返佣表") |
|||
@TableName(value = "t_return_commission", autoResultMap = true) |
|||
public class ReturnCommission implements Serializable { |
|||
private String id = SnowFlakeUtil.nextId().toString(); |
|||
|
|||
private String createBy; |
|||
|
|||
private Date createTime; |
|||
|
|||
private Integer delFlag; |
|||
|
|||
private String updateBy; |
|||
|
|||
private Date updateTime; |
|||
|
|||
@ApiModelProperty(value = "商铺") |
|||
private String shopId; |
|||
|
|||
@ApiModelProperty(value = "返佣金额") |
|||
private BigDecimal commission; |
|||
|
|||
@ApiModelProperty(value = "返佣状态 0-审核中 1-返佣成功 2-返佣失败") |
|||
private String status; |
|||
|
|||
@ApiModelProperty(value = "返佣失败描述") |
|||
private String failMessage; |
|||
|
|||
@ApiModelProperty(value = "备注") |
|||
private String remark; |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
public String getId() { |
|||
return id; |
|||
} |
|||
|
|||
public void setId(String id) { |
|||
this.id = id; |
|||
} |
|||
|
|||
public String getCreateBy() { |
|||
return createBy; |
|||
} |
|||
|
|||
public void setCreateBy(String createBy) { |
|||
this.createBy = createBy; |
|||
} |
|||
|
|||
public Date getCreateTime() { |
|||
return createTime; |
|||
} |
|||
|
|||
public void setCreateTime(Date createTime) { |
|||
this.createTime = createTime; |
|||
} |
|||
|
|||
public Integer getDelFlag() { |
|||
return delFlag; |
|||
} |
|||
|
|||
public void setDelFlag(Integer delFlag) { |
|||
this.delFlag = delFlag; |
|||
} |
|||
|
|||
public String getUpdateBy() { |
|||
return updateBy; |
|||
} |
|||
|
|||
public void setUpdateBy(String updateBy) { |
|||
this.updateBy = updateBy; |
|||
} |
|||
|
|||
public Date getUpdateTime() { |
|||
return updateTime; |
|||
} |
|||
|
|||
public void setUpdateTime(Date updateTime) { |
|||
this.updateTime = updateTime; |
|||
} |
|||
|
|||
public String getShopId() { |
|||
return shopId; |
|||
} |
|||
|
|||
public void setShopId(String shopId) { |
|||
this.shopId = shopId; |
|||
} |
|||
|
|||
public BigDecimal getCommission() { |
|||
return commission; |
|||
} |
|||
|
|||
public void setCommission(BigDecimal commission) { |
|||
this.commission = commission; |
|||
} |
|||
|
|||
public String getStatus() { |
|||
return status; |
|||
} |
|||
|
|||
public void setStatus(String status) { |
|||
this.status = status; |
|||
} |
|||
|
|||
public String getFailMessage() { |
|||
return failMessage; |
|||
} |
|||
|
|||
public void setFailMessage(String failMessage) { |
|||
this.failMessage = failMessage; |
|||
} |
|||
|
|||
public String getRemark() { |
|||
return remark; |
|||
} |
|||
|
|||
public void setRemark(String remark) { |
|||
this.remark = remark; |
|||
} |
|||
|
|||
@Override |
|||
public String toString() { |
|||
StringBuilder sb = new StringBuilder(); |
|||
sb.append(getClass().getSimpleName()); |
|||
sb.append(" ["); |
|||
sb.append("Hash = ").append(hashCode()); |
|||
sb.append(", id=").append(id); |
|||
sb.append(", createBy=").append(createBy); |
|||
sb.append(", createTime=").append(createTime); |
|||
sb.append(", delFlag=").append(delFlag); |
|||
sb.append(", updateBy=").append(updateBy); |
|||
sb.append(", updateTime=").append(updateTime); |
|||
sb.append(", shopId=").append(shopId); |
|||
sb.append(", commission=").append(commission); |
|||
sb.append(", status=").append(status); |
|||
sb.append(", failMessage=").append(failMessage); |
|||
sb.append(", remark=").append(remark); |
|||
sb.append(", serialVersionUID=").append(serialVersionUID); |
|||
sb.append("]"); |
|||
return sb.toString(); |
|||
} |
|||
} |
|||
@ -0,0 +1,931 @@ |
|||
package cc.hiver.mall.entity; |
|||
|
|||
import java.math.BigDecimal; |
|||
import java.util.ArrayList; |
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
public class ReturnCommissionExample { |
|||
protected String orderByClause; |
|||
|
|||
protected boolean distinct; |
|||
|
|||
protected List<Criteria> oredCriteria; |
|||
|
|||
public ReturnCommissionExample() { |
|||
oredCriteria = new ArrayList<>(); |
|||
} |
|||
|
|||
public void setOrderByClause(String orderByClause) { |
|||
this.orderByClause = orderByClause; |
|||
} |
|||
|
|||
public String getOrderByClause() { |
|||
return orderByClause; |
|||
} |
|||
|
|||
public void setDistinct(boolean distinct) { |
|||
this.distinct = distinct; |
|||
} |
|||
|
|||
public boolean isDistinct() { |
|||
return distinct; |
|||
} |
|||
|
|||
public List<Criteria> getOredCriteria() { |
|||
return oredCriteria; |
|||
} |
|||
|
|||
public void or(Criteria criteria) { |
|||
oredCriteria.add(criteria); |
|||
} |
|||
|
|||
public Criteria or() { |
|||
Criteria criteria = createCriteriaInternal(); |
|||
oredCriteria.add(criteria); |
|||
return criteria; |
|||
} |
|||
|
|||
public Criteria createCriteria() { |
|||
Criteria criteria = createCriteriaInternal(); |
|||
if (oredCriteria.size() == 0) { |
|||
oredCriteria.add(criteria); |
|||
} |
|||
return criteria; |
|||
} |
|||
|
|||
protected Criteria createCriteriaInternal() { |
|||
Criteria criteria = new Criteria(); |
|||
return criteria; |
|||
} |
|||
|
|||
public void clear() { |
|||
oredCriteria.clear(); |
|||
orderByClause = null; |
|||
distinct = false; |
|||
} |
|||
|
|||
protected abstract static class GeneratedCriteria { |
|||
protected List<Criterion> criteria; |
|||
|
|||
protected GeneratedCriteria() { |
|||
super(); |
|||
criteria = new ArrayList<>(); |
|||
} |
|||
|
|||
public boolean isValid() { |
|||
return criteria.size() > 0; |
|||
} |
|||
|
|||
public List<Criterion> getAllCriteria() { |
|||
return criteria; |
|||
} |
|||
|
|||
public List<Criterion> getCriteria() { |
|||
return criteria; |
|||
} |
|||
|
|||
protected void addCriterion(String condition) { |
|||
if (condition == null) { |
|||
throw new RuntimeException("Value for condition cannot be null"); |
|||
} |
|||
criteria.add(new Criterion(condition)); |
|||
} |
|||
|
|||
protected void addCriterion(String condition, Object value, String property) { |
|||
if (value == null) { |
|||
throw new RuntimeException("Value for " + property + " cannot be null"); |
|||
} |
|||
criteria.add(new Criterion(condition, value)); |
|||
} |
|||
|
|||
protected void addCriterion(String condition, Object value1, Object value2, String property) { |
|||
if (value1 == null || value2 == null) { |
|||
throw new RuntimeException("Between values for " + property + " cannot be null"); |
|||
} |
|||
criteria.add(new Criterion(condition, value1, value2)); |
|||
} |
|||
|
|||
public Criteria andIdIsNull() { |
|||
addCriterion("id is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdIsNotNull() { |
|||
addCriterion("id is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdEqualTo(String value) { |
|||
addCriterion("id =", value, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdNotEqualTo(String value) { |
|||
addCriterion("id <>", value, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdGreaterThan(String value) { |
|||
addCriterion("id >", value, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdGreaterThanOrEqualTo(String value) { |
|||
addCriterion("id >=", value, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdLessThan(String value) { |
|||
addCriterion("id <", value, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdLessThanOrEqualTo(String value) { |
|||
addCriterion("id <=", value, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdLike(String value) { |
|||
addCriterion("id like", value, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdNotLike(String value) { |
|||
addCriterion("id not like", value, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdIn(List<String> values) { |
|||
addCriterion("id in", values, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdNotIn(List<String> values) { |
|||
addCriterion("id not in", values, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdBetween(String value1, String value2) { |
|||
addCriterion("id between", value1, value2, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdNotBetween(String value1, String value2) { |
|||
addCriterion("id not between", value1, value2, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreateByIsNull() { |
|||
addCriterion("create_by is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreateByIsNotNull() { |
|||
addCriterion("create_by is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreateByEqualTo(String value) { |
|||
addCriterion("create_by =", value, "createBy"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreateByNotEqualTo(String value) { |
|||
addCriterion("create_by <>", value, "createBy"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreateByGreaterThan(String value) { |
|||
addCriterion("create_by >", value, "createBy"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreateByGreaterThanOrEqualTo(String value) { |
|||
addCriterion("create_by >=", value, "createBy"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreateByLessThan(String value) { |
|||
addCriterion("create_by <", value, "createBy"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreateByLessThanOrEqualTo(String value) { |
|||
addCriterion("create_by <=", value, "createBy"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreateByLike(String value) { |
|||
addCriterion("create_by like", value, "createBy"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreateByNotLike(String value) { |
|||
addCriterion("create_by not like", value, "createBy"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreateByIn(List<String> values) { |
|||
addCriterion("create_by in", values, "createBy"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreateByNotIn(List<String> values) { |
|||
addCriterion("create_by not in", values, "createBy"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreateByBetween(String value1, String value2) { |
|||
addCriterion("create_by between", value1, value2, "createBy"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreateByNotBetween(String value1, String value2) { |
|||
addCriterion("create_by not between", value1, value2, "createBy"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreateTimeIsNull() { |
|||
addCriterion("create_time is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreateTimeIsNotNull() { |
|||
addCriterion("create_time is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreateTimeEqualTo(Date value) { |
|||
addCriterion("create_time =", value, "createTime"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreateTimeNotEqualTo(Date value) { |
|||
addCriterion("create_time <>", value, "createTime"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreateTimeGreaterThan(Date value) { |
|||
addCriterion("create_time >", value, "createTime"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) { |
|||
addCriterion("create_time >=", value, "createTime"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreateTimeLessThan(Date value) { |
|||
addCriterion("create_time <", value, "createTime"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreateTimeLessThanOrEqualTo(Date value) { |
|||
addCriterion("create_time <=", value, "createTime"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreateTimeIn(List<Date> values) { |
|||
addCriterion("create_time in", values, "createTime"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreateTimeNotIn(List<Date> values) { |
|||
addCriterion("create_time not in", values, "createTime"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreateTimeBetween(Date value1, Date value2) { |
|||
addCriterion("create_time between", value1, value2, "createTime"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreateTimeNotBetween(Date value1, Date value2) { |
|||
addCriterion("create_time not between", value1, value2, "createTime"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andDelFlagIsNull() { |
|||
addCriterion("del_flag is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andDelFlagIsNotNull() { |
|||
addCriterion("del_flag is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andDelFlagEqualTo(Integer value) { |
|||
addCriterion("del_flag =", value, "delFlag"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andDelFlagNotEqualTo(Integer value) { |
|||
addCriterion("del_flag <>", value, "delFlag"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andDelFlagGreaterThan(Integer value) { |
|||
addCriterion("del_flag >", value, "delFlag"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andDelFlagGreaterThanOrEqualTo(Integer value) { |
|||
addCriterion("del_flag >=", value, "delFlag"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andDelFlagLessThan(Integer value) { |
|||
addCriterion("del_flag <", value, "delFlag"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andDelFlagLessThanOrEqualTo(Integer value) { |
|||
addCriterion("del_flag <=", value, "delFlag"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andDelFlagIn(List<Integer> values) { |
|||
addCriterion("del_flag in", values, "delFlag"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andDelFlagNotIn(List<Integer> values) { |
|||
addCriterion("del_flag not in", values, "delFlag"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andDelFlagBetween(Integer value1, Integer value2) { |
|||
addCriterion("del_flag between", value1, value2, "delFlag"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andDelFlagNotBetween(Integer value1, Integer value2) { |
|||
addCriterion("del_flag not between", value1, value2, "delFlag"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdateByIsNull() { |
|||
addCriterion("update_by is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdateByIsNotNull() { |
|||
addCriterion("update_by is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdateByEqualTo(String value) { |
|||
addCriterion("update_by =", value, "updateBy"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdateByNotEqualTo(String value) { |
|||
addCriterion("update_by <>", value, "updateBy"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdateByGreaterThan(String value) { |
|||
addCriterion("update_by >", value, "updateBy"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdateByGreaterThanOrEqualTo(String value) { |
|||
addCriterion("update_by >=", value, "updateBy"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdateByLessThan(String value) { |
|||
addCriterion("update_by <", value, "updateBy"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdateByLessThanOrEqualTo(String value) { |
|||
addCriterion("update_by <=", value, "updateBy"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdateByLike(String value) { |
|||
addCriterion("update_by like", value, "updateBy"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdateByNotLike(String value) { |
|||
addCriterion("update_by not like", value, "updateBy"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdateByIn(List<String> values) { |
|||
addCriterion("update_by in", values, "updateBy"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdateByNotIn(List<String> values) { |
|||
addCriterion("update_by not in", values, "updateBy"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdateByBetween(String value1, String value2) { |
|||
addCriterion("update_by between", value1, value2, "updateBy"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdateByNotBetween(String value1, String value2) { |
|||
addCriterion("update_by not between", value1, value2, "updateBy"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdateTimeIsNull() { |
|||
addCriterion("update_time is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdateTimeIsNotNull() { |
|||
addCriterion("update_time is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdateTimeEqualTo(Date value) { |
|||
addCriterion("update_time =", value, "updateTime"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdateTimeNotEqualTo(Date value) { |
|||
addCriterion("update_time <>", value, "updateTime"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdateTimeGreaterThan(Date value) { |
|||
addCriterion("update_time >", value, "updateTime"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) { |
|||
addCriterion("update_time >=", value, "updateTime"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdateTimeLessThan(Date value) { |
|||
addCriterion("update_time <", value, "updateTime"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdateTimeLessThanOrEqualTo(Date value) { |
|||
addCriterion("update_time <=", value, "updateTime"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdateTimeIn(List<Date> values) { |
|||
addCriterion("update_time in", values, "updateTime"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdateTimeNotIn(List<Date> values) { |
|||
addCriterion("update_time not in", values, "updateTime"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdateTimeBetween(Date value1, Date value2) { |
|||
addCriterion("update_time between", value1, value2, "updateTime"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdateTimeNotBetween(Date value1, Date value2) { |
|||
addCriterion("update_time not between", value1, value2, "updateTime"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andShopIdIsNull() { |
|||
addCriterion("shop_id is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andShopIdIsNotNull() { |
|||
addCriterion("shop_id is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andShopIdEqualTo(String value) { |
|||
addCriterion("shop_id =", value, "shopId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andShopIdNotEqualTo(String value) { |
|||
addCriterion("shop_id <>", value, "shopId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andShopIdGreaterThan(String value) { |
|||
addCriterion("shop_id >", value, "shopId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andShopIdGreaterThanOrEqualTo(String value) { |
|||
addCriterion("shop_id >=", value, "shopId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andShopIdLessThan(String value) { |
|||
addCriterion("shop_id <", value, "shopId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andShopIdLessThanOrEqualTo(String value) { |
|||
addCriterion("shop_id <=", value, "shopId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andShopIdLike(String value) { |
|||
addCriterion("shop_id like", value, "shopId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andShopIdNotLike(String value) { |
|||
addCriterion("shop_id not like", value, "shopId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andShopIdIn(List<String> values) { |
|||
addCriterion("shop_id in", values, "shopId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andShopIdNotIn(List<String> values) { |
|||
addCriterion("shop_id not in", values, "shopId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andShopIdBetween(String value1, String value2) { |
|||
addCriterion("shop_id between", value1, value2, "shopId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andShopIdNotBetween(String value1, String value2) { |
|||
addCriterion("shop_id not between", value1, value2, "shopId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCommissionIsNull() { |
|||
addCriterion("commission is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCommissionIsNotNull() { |
|||
addCriterion("commission is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCommissionEqualTo(BigDecimal value) { |
|||
addCriterion("commission =", value, "commission"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCommissionNotEqualTo(BigDecimal value) { |
|||
addCriterion("commission <>", value, "commission"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCommissionGreaterThan(BigDecimal value) { |
|||
addCriterion("commission >", value, "commission"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCommissionGreaterThanOrEqualTo(BigDecimal value) { |
|||
addCriterion("commission >=", value, "commission"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCommissionLessThan(BigDecimal value) { |
|||
addCriterion("commission <", value, "commission"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCommissionLessThanOrEqualTo(BigDecimal value) { |
|||
addCriterion("commission <=", value, "commission"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCommissionIn(List<BigDecimal> values) { |
|||
addCriterion("commission in", values, "commission"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCommissionNotIn(List<BigDecimal> values) { |
|||
addCriterion("commission not in", values, "commission"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCommissionBetween(BigDecimal value1, BigDecimal value2) { |
|||
addCriterion("commission between", value1, value2, "commission"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCommissionNotBetween(BigDecimal value1, BigDecimal value2) { |
|||
addCriterion("commission not between", value1, value2, "commission"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andStatusIsNull() { |
|||
addCriterion("status is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andStatusIsNotNull() { |
|||
addCriterion("status is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andStatusEqualTo(String value) { |
|||
addCriterion("status =", value, "status"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andStatusNotEqualTo(String value) { |
|||
addCriterion("status <>", value, "status"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andStatusGreaterThan(String value) { |
|||
addCriterion("status >", value, "status"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andStatusGreaterThanOrEqualTo(String value) { |
|||
addCriterion("status >=", value, "status"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andStatusLessThan(String value) { |
|||
addCriterion("status <", value, "status"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andStatusLessThanOrEqualTo(String value) { |
|||
addCriterion("status <=", value, "status"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andStatusLike(String value) { |
|||
addCriterion("status like", value, "status"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andStatusNotLike(String value) { |
|||
addCriterion("status not like", value, "status"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andStatusIn(List<String> values) { |
|||
addCriterion("status in", values, "status"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andStatusNotIn(List<String> values) { |
|||
addCriterion("status not in", values, "status"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andStatusBetween(String value1, String value2) { |
|||
addCriterion("status between", value1, value2, "status"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andStatusNotBetween(String value1, String value2) { |
|||
addCriterion("status not between", value1, value2, "status"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andFailMessageIsNull() { |
|||
addCriterion("fail_message is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andFailMessageIsNotNull() { |
|||
addCriterion("fail_message is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andFailMessageEqualTo(String value) { |
|||
addCriterion("fail_message =", value, "failMessage"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andFailMessageNotEqualTo(String value) { |
|||
addCriterion("fail_message <>", value, "failMessage"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andFailMessageGreaterThan(String value) { |
|||
addCriterion("fail_message >", value, "failMessage"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andFailMessageGreaterThanOrEqualTo(String value) { |
|||
addCriterion("fail_message >=", value, "failMessage"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andFailMessageLessThan(String value) { |
|||
addCriterion("fail_message <", value, "failMessage"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andFailMessageLessThanOrEqualTo(String value) { |
|||
addCriterion("fail_message <=", value, "failMessage"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andFailMessageLike(String value) { |
|||
addCriterion("fail_message like", value, "failMessage"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andFailMessageNotLike(String value) { |
|||
addCriterion("fail_message not like", value, "failMessage"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andFailMessageIn(List<String> values) { |
|||
addCriterion("fail_message in", values, "failMessage"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andFailMessageNotIn(List<String> values) { |
|||
addCriterion("fail_message not in", values, "failMessage"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andFailMessageBetween(String value1, String value2) { |
|||
addCriterion("fail_message between", value1, value2, "failMessage"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andFailMessageNotBetween(String value1, String value2) { |
|||
addCriterion("fail_message not between", value1, value2, "failMessage"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRemarkIsNull() { |
|||
addCriterion("remark is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRemarkIsNotNull() { |
|||
addCriterion("remark is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRemarkEqualTo(String value) { |
|||
addCriterion("remark =", value, "remark"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRemarkNotEqualTo(String value) { |
|||
addCriterion("remark <>", value, "remark"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRemarkGreaterThan(String value) { |
|||
addCriterion("remark >", value, "remark"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRemarkGreaterThanOrEqualTo(String value) { |
|||
addCriterion("remark >=", value, "remark"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRemarkLessThan(String value) { |
|||
addCriterion("remark <", value, "remark"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRemarkLessThanOrEqualTo(String value) { |
|||
addCriterion("remark <=", value, "remark"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRemarkLike(String value) { |
|||
addCriterion("remark like", value, "remark"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRemarkNotLike(String value) { |
|||
addCriterion("remark not like", value, "remark"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRemarkIn(List<String> values) { |
|||
addCriterion("remark in", values, "remark"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRemarkNotIn(List<String> values) { |
|||
addCriterion("remark not in", values, "remark"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRemarkBetween(String value1, String value2) { |
|||
addCriterion("remark between", value1, value2, "remark"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRemarkNotBetween(String value1, String value2) { |
|||
addCriterion("remark not between", value1, value2, "remark"); |
|||
return (Criteria) this; |
|||
} |
|||
} |
|||
|
|||
public static class Criteria extends GeneratedCriteria { |
|||
protected Criteria() { |
|||
super(); |
|||
} |
|||
} |
|||
|
|||
public static class Criterion { |
|||
private String condition; |
|||
|
|||
private Object value; |
|||
|
|||
private Object secondValue; |
|||
|
|||
private boolean noValue; |
|||
|
|||
private boolean singleValue; |
|||
|
|||
private boolean betweenValue; |
|||
|
|||
private boolean listValue; |
|||
|
|||
private String typeHandler; |
|||
|
|||
public String getCondition() { |
|||
return condition; |
|||
} |
|||
|
|||
public Object getValue() { |
|||
return value; |
|||
} |
|||
|
|||
public Object getSecondValue() { |
|||
return secondValue; |
|||
} |
|||
|
|||
public boolean isNoValue() { |
|||
return noValue; |
|||
} |
|||
|
|||
public boolean isSingleValue() { |
|||
return singleValue; |
|||
} |
|||
|
|||
public boolean isBetweenValue() { |
|||
return betweenValue; |
|||
} |
|||
|
|||
public boolean isListValue() { |
|||
return listValue; |
|||
} |
|||
|
|||
public String getTypeHandler() { |
|||
return typeHandler; |
|||
} |
|||
|
|||
protected Criterion(String condition) { |
|||
super(); |
|||
this.condition = condition; |
|||
this.typeHandler = null; |
|||
this.noValue = true; |
|||
} |
|||
|
|||
protected Criterion(String condition, Object value, String typeHandler) { |
|||
super(); |
|||
this.condition = condition; |
|||
this.value = value; |
|||
this.typeHandler = typeHandler; |
|||
if (value instanceof List<?>) { |
|||
this.listValue = true; |
|||
} else { |
|||
this.singleValue = true; |
|||
} |
|||
} |
|||
|
|||
protected Criterion(String condition, Object value) { |
|||
this(condition, value, null); |
|||
} |
|||
|
|||
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { |
|||
super(); |
|||
this.condition = condition; |
|||
this.value = value; |
|||
this.secondValue = secondValue; |
|||
this.typeHandler = typeHandler; |
|||
this.betweenValue = true; |
|||
} |
|||
|
|||
protected Criterion(String condition, Object value, Object secondValue) { |
|||
this(condition, value, secondValue, null); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,8 @@ |
|||
package cc.hiver.mall.service.mybatis; |
|||
|
|||
import cc.hiver.mall.entity.Product; |
|||
import cc.hiver.mall.entity.ReturnCommission; |
|||
import com.baomidou.mybatisplus.extension.service.IService; |
|||
|
|||
public interface ReturnCommissionService extends IService<ReturnCommission> { |
|||
} |
|||
@ -0,0 +1,17 @@ |
|||
package cc.hiver.mall.serviceimpl.mybatis; |
|||
|
|||
import cc.hiver.mall.dao.mapper.PurchaseMapper; |
|||
import cc.hiver.mall.dao.mapper.ReturnCommissionMapper; |
|||
import cc.hiver.mall.entity.Purchase; |
|||
import cc.hiver.mall.entity.ReturnCommission; |
|||
import cc.hiver.mall.service.mybatis.PurchaseService; |
|||
import cc.hiver.mall.service.mybatis.ReturnCommissionService; |
|||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
@Service |
|||
public class ReturnCommissionServiceImpl extends ServiceImpl<ReturnCommissionMapper, ReturnCommission> implements ReturnCommissionService { |
|||
|
|||
|
|||
|
|||
} |
|||
@ -1,6 +1,5 @@ |
|||
package cc.hiver.app.util; |
|||
package cc.hiver.mall.utils; |
|||
|
|||
import cc.hiver.core.common.utils.ResultUtil; |
|||
import com.alipay.api.AlipayApiException; |
|||
import com.alipay.api.AlipayClient; |
|||
import com.alipay.api.CertAlipayRequest; |
|||
@ -0,0 +1,306 @@ |
|||
<?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="cc.hiver.mall.dao.mapper.ReturnCommissionMapper"> |
|||
<resultMap id="BaseResultMap" type="cc.hiver.mall.entity.ReturnCommission"> |
|||
<id column="id" jdbcType="VARCHAR" property="id" /> |
|||
<result column="create_by" jdbcType="VARCHAR" property="createBy" /> |
|||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" /> |
|||
<result column="del_flag" jdbcType="INTEGER" property="delFlag" /> |
|||
<result column="update_by" jdbcType="VARCHAR" property="updateBy" /> |
|||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" /> |
|||
<result column="shop_id" jdbcType="VARCHAR" property="shopId" /> |
|||
<result column="commission" jdbcType="DECIMAL" property="commission" /> |
|||
<result column="status" jdbcType="VARCHAR" property="status" /> |
|||
<result column="fail_message" jdbcType="VARCHAR" property="failMessage" /> |
|||
<result column="remark" jdbcType="VARCHAR" property="remark" /> |
|||
</resultMap> |
|||
<sql id="Example_Where_Clause"> |
|||
<where> |
|||
<foreach collection="oredCriteria" item="criteria" separator="or"> |
|||
<if test="criteria.valid"> |
|||
<trim prefix="(" prefixOverrides="and" suffix=")"> |
|||
<foreach collection="criteria.criteria" item="criterion"> |
|||
<choose> |
|||
<when test="criterion.noValue"> |
|||
and ${criterion.condition} |
|||
</when> |
|||
<when test="criterion.singleValue"> |
|||
and ${criterion.condition} #{criterion.value} |
|||
</when> |
|||
<when test="criterion.betweenValue"> |
|||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} |
|||
</when> |
|||
<when test="criterion.listValue"> |
|||
and ${criterion.condition} |
|||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> |
|||
#{listItem} |
|||
</foreach> |
|||
</when> |
|||
</choose> |
|||
</foreach> |
|||
</trim> |
|||
</if> |
|||
</foreach> |
|||
</where> |
|||
</sql> |
|||
<sql id="Update_By_Example_Where_Clause"> |
|||
<where> |
|||
<foreach collection="example.oredCriteria" item="criteria" separator="or"> |
|||
<if test="criteria.valid"> |
|||
<trim prefix="(" prefixOverrides="and" suffix=")"> |
|||
<foreach collection="criteria.criteria" item="criterion"> |
|||
<choose> |
|||
<when test="criterion.noValue"> |
|||
and ${criterion.condition} |
|||
</when> |
|||
<when test="criterion.singleValue"> |
|||
and ${criterion.condition} #{criterion.value} |
|||
</when> |
|||
<when test="criterion.betweenValue"> |
|||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} |
|||
</when> |
|||
<when test="criterion.listValue"> |
|||
and ${criterion.condition} |
|||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> |
|||
#{listItem} |
|||
</foreach> |
|||
</when> |
|||
</choose> |
|||
</foreach> |
|||
</trim> |
|||
</if> |
|||
</foreach> |
|||
</where> |
|||
</sql> |
|||
<sql id="Base_Column_List"> |
|||
id, create_by, create_time, del_flag, update_by, update_time, shop_id, commission, |
|||
status, fail_message, remark |
|||
</sql> |
|||
<select id="selectByExample" parameterType="cc.hiver.mall.entity.ReturnCommissionExample" resultMap="BaseResultMap"> |
|||
select |
|||
<if test="distinct"> |
|||
distinct |
|||
</if> |
|||
<include refid="Base_Column_List" /> |
|||
from t_return_commission |
|||
<if test="_parameter != null"> |
|||
<include refid="Example_Where_Clause" /> |
|||
</if> |
|||
<if test="orderByClause != null"> |
|||
order by ${orderByClause} |
|||
</if> |
|||
</select> |
|||
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap"> |
|||
select |
|||
<include refid="Base_Column_List" /> |
|||
from t_return_commission |
|||
where id = #{id,jdbcType=VARCHAR} |
|||
</select> |
|||
<delete id="deleteByPrimaryKey" parameterType="java.lang.String"> |
|||
delete from t_return_commission |
|||
where id = #{id,jdbcType=VARCHAR} |
|||
</delete> |
|||
<delete id="deleteByExample" parameterType="cc.hiver.mall.entity.ReturnCommissionExample"> |
|||
delete from t_return_commission |
|||
<if test="_parameter != null"> |
|||
<include refid="Example_Where_Clause" /> |
|||
</if> |
|||
</delete> |
|||
<insert id="insert" parameterType="cc.hiver.mall.entity.ReturnCommission"> |
|||
insert into t_return_commission (id, create_by, create_time, |
|||
del_flag, update_by, update_time, |
|||
shop_id, commission, status, |
|||
fail_message, remark) |
|||
values (#{id,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, |
|||
#{delFlag,jdbcType=INTEGER}, #{updateBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, |
|||
#{shopId,jdbcType=VARCHAR}, #{commission,jdbcType=DECIMAL}, #{status,jdbcType=VARCHAR}, |
|||
#{failMessage,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}) |
|||
</insert> |
|||
<insert id="insertSelective" parameterType="cc.hiver.mall.entity.ReturnCommission"> |
|||
insert into t_return_commission |
|||
<trim prefix="(" suffix=")" suffixOverrides=","> |
|||
<if test="id != null"> |
|||
id, |
|||
</if> |
|||
<if test="createBy != null"> |
|||
create_by, |
|||
</if> |
|||
<if test="createTime != null"> |
|||
create_time, |
|||
</if> |
|||
<if test="delFlag != null"> |
|||
del_flag, |
|||
</if> |
|||
<if test="updateBy != null"> |
|||
update_by, |
|||
</if> |
|||
<if test="updateTime != null"> |
|||
update_time, |
|||
</if> |
|||
<if test="shopId != null"> |
|||
shop_id, |
|||
</if> |
|||
<if test="commission != null"> |
|||
commission, |
|||
</if> |
|||
<if test="status != null"> |
|||
status, |
|||
</if> |
|||
<if test="failMessage != null"> |
|||
fail_message, |
|||
</if> |
|||
<if test="remark != null"> |
|||
remark, |
|||
</if> |
|||
</trim> |
|||
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|||
<if test="id != null"> |
|||
#{id,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="createBy != null"> |
|||
#{createBy,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="createTime != null"> |
|||
#{createTime,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="delFlag != null"> |
|||
#{delFlag,jdbcType=INTEGER}, |
|||
</if> |
|||
<if test="updateBy != null"> |
|||
#{updateBy,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="updateTime != null"> |
|||
#{updateTime,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="shopId != null"> |
|||
#{shopId,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="commission != null"> |
|||
#{commission,jdbcType=DECIMAL}, |
|||
</if> |
|||
<if test="status != null"> |
|||
#{status,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="failMessage != null"> |
|||
#{failMessage,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="remark != null"> |
|||
#{remark,jdbcType=VARCHAR}, |
|||
</if> |
|||
</trim> |
|||
</insert> |
|||
<select id="countByExample" parameterType="cc.hiver.mall.entity.ReturnCommissionExample" resultType="java.lang.Long"> |
|||
select count(*) from t_return_commission |
|||
<if test="_parameter != null"> |
|||
<include refid="Example_Where_Clause" /> |
|||
</if> |
|||
</select> |
|||
<update id="updateByExampleSelective" parameterType="map"> |
|||
update t_return_commission |
|||
<set> |
|||
<if test="record.id != null"> |
|||
id = #{record.id,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.createBy != null"> |
|||
create_by = #{record.createBy,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.createTime != null"> |
|||
create_time = #{record.createTime,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="record.delFlag != null"> |
|||
del_flag = #{record.delFlag,jdbcType=INTEGER}, |
|||
</if> |
|||
<if test="record.updateBy != null"> |
|||
update_by = #{record.updateBy,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.updateTime != null"> |
|||
update_time = #{record.updateTime,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="record.shopId != null"> |
|||
shop_id = #{record.shopId,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.commission != null"> |
|||
commission = #{record.commission,jdbcType=DECIMAL}, |
|||
</if> |
|||
<if test="record.status != null"> |
|||
status = #{record.status,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.failMessage != null"> |
|||
fail_message = #{record.failMessage,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.remark != null"> |
|||
remark = #{record.remark,jdbcType=VARCHAR}, |
|||
</if> |
|||
</set> |
|||
<if test="_parameter != null"> |
|||
<include refid="Update_By_Example_Where_Clause" /> |
|||
</if> |
|||
</update> |
|||
<update id="updateByExample" parameterType="map"> |
|||
update t_return_commission |
|||
set id = #{record.id,jdbcType=VARCHAR}, |
|||
create_by = #{record.createBy,jdbcType=VARCHAR}, |
|||
create_time = #{record.createTime,jdbcType=TIMESTAMP}, |
|||
del_flag = #{record.delFlag,jdbcType=INTEGER}, |
|||
update_by = #{record.updateBy,jdbcType=VARCHAR}, |
|||
update_time = #{record.updateTime,jdbcType=TIMESTAMP}, |
|||
shop_id = #{record.shopId,jdbcType=VARCHAR}, |
|||
commission = #{record.commission,jdbcType=DECIMAL}, |
|||
status = #{record.status,jdbcType=VARCHAR}, |
|||
fail_message = #{record.failMessage,jdbcType=VARCHAR}, |
|||
remark = #{record.remark,jdbcType=VARCHAR} |
|||
<if test="_parameter != null"> |
|||
<include refid="Update_By_Example_Where_Clause" /> |
|||
</if> |
|||
</update> |
|||
<update id="updateByPrimaryKeySelective" parameterType="cc.hiver.mall.entity.ReturnCommission"> |
|||
update t_return_commission |
|||
<set> |
|||
<if test="createBy != null"> |
|||
create_by = #{createBy,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="createTime != null"> |
|||
create_time = #{createTime,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="delFlag != null"> |
|||
del_flag = #{delFlag,jdbcType=INTEGER}, |
|||
</if> |
|||
<if test="updateBy != null"> |
|||
update_by = #{updateBy,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="updateTime != null"> |
|||
update_time = #{updateTime,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="shopId != null"> |
|||
shop_id = #{shopId,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="commission != null"> |
|||
commission = #{commission,jdbcType=DECIMAL}, |
|||
</if> |
|||
<if test="status != null"> |
|||
status = #{status,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="failMessage != null"> |
|||
fail_message = #{failMessage,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="remark != null"> |
|||
remark = #{remark,jdbcType=VARCHAR}, |
|||
</if> |
|||
</set> |
|||
where id = #{id,jdbcType=VARCHAR} |
|||
</update> |
|||
<update id="updateByPrimaryKey" parameterType="cc.hiver.mall.entity.ReturnCommission"> |
|||
update t_return_commission |
|||
set create_by = #{createBy,jdbcType=VARCHAR}, |
|||
create_time = #{createTime,jdbcType=TIMESTAMP}, |
|||
del_flag = #{delFlag,jdbcType=INTEGER}, |
|||
update_by = #{updateBy,jdbcType=VARCHAR}, |
|||
update_time = #{updateTime,jdbcType=TIMESTAMP}, |
|||
shop_id = #{shopId,jdbcType=VARCHAR}, |
|||
commission = #{commission,jdbcType=DECIMAL}, |
|||
status = #{status,jdbcType=VARCHAR}, |
|||
fail_message = #{failMessage,jdbcType=VARCHAR}, |
|||
remark = #{remark,jdbcType=VARCHAR} |
|||
where id = #{id,jdbcType=VARCHAR} |
|||
</update> |
|||
</mapper> |
|||
Loading…
Reference in new issue