Commit 80cc7c3d authored by 罗林杰's avatar 罗林杰

初始化充值,消费记录

parent 3d6de963
......@@ -40,11 +40,9 @@ public class CustInfo extends CyIdIncreEntity<CustInfo> {
* @column customer_birthday
* @default
*/
@JsonFormat(
pattern = "yyyy-MM-dd"
)
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "生日", orderNum = "2", width = 20, format = "yyyy-MM-dd")
@DateTimeFormat(pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date customerBirthday;
/**
......@@ -72,18 +70,38 @@ public class CustInfo extends CyIdIncreEntity<CustInfo> {
private String storeId;
/**
* 开始时间
* 生日开始时间
*/
@JsonIgnore
@TableField(exist = false)
private String beginTime;
/**
* 结束时间
* 生日结束时间
*/
@JsonIgnore
@TableField(exist = false)
private String endTime;
/**
* 创建开始时间
*/
@JsonIgnore
@TableField(exist = false)
private String startTime;
/**
* 创建结束时间
*/
@JsonIgnore
@TableField(exist = false)
private String finishTime;
/**
* 创建人名称
*/
@TableField(exist = false)
private String createName;
}
package org.rcisoft.bus.custrecharge.controller;
/*固定导入*/
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.rcisoft.core.anno.CyOpeLogAnno;
import org.rcisoft.core.operlog.enums.CyLogTypeEnum;
import org.rcisoft.core.util.CyEpExcelUtil;
import org.springframework.validation.BindingResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.rcisoft.core.result.CyResult;
import org.rcisoft.core.util.CyResultGenUtil;
import org.rcisoft.core.model.CyPersistModel;
import org.rcisoft.core.constant.CyMessCons;
import org.rcisoft.core.controller.CyPaginationController;
import org.rcisoft.core.util.CyUserUtil;
import org.rcisoft.core.model.CyGridModel;
import org.rcisoft.core.exception.CyServiceException;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import org.rcisoft.bus.custrecharge.entity.CustRecharge;
import org.rcisoft.bus.custrecharge.service.CustRechargeService;
import java.util.List;
/**
* Created by cy on 2024年12月13日 上午11:27:11.
*/
@RestController
@RequestMapping("/custrecharge")
public class CustRechargeController extends CyPaginationController<CustRecharge> {
@Autowired
private CustRechargeService custRechargeServiceImpl;
//@PreAuthorize("@cyPerm.hasPerm('sys:tRecharge:add')")
@CyOpeLogAnno(title = "system-客户消费表管理-新增客户消费表", businessType = CyLogTypeEnum.INSERT)
@ApiOperation(value="添加客户消费表", notes="添加客户消费表")
@PostMapping(value = "/add")
public CyResult add(@Valid CustRecharge custRecharge, BindingResult bindingResult) {
CyPersistModel data = custRechargeServiceImpl.persist(custRecharge);
return CyResultGenUtil.builder(data,
CyMessCons.MESSAGE_ALERT_SUCCESS,
CyMessCons.MESSAGE_ALERT_ERROR,
custRecharge);
}
//@PreAuthorize("@cyPerm.hasPerm('sys:tRecharge:delete')")
@CyOpeLogAnno(title = "system-客户消费表管理-删除客户消费表", businessType = CyLogTypeEnum.DELETE)
@ApiOperation(value="逻辑删除客户消费表", notes="逻辑删除客户消费表")
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = true, dataType = "varchar")})
@DeleteMapping("/deleteLogical/{businessId:\\w+}")
public CyResult deleteLogical(@PathVariable int businessId,CustRecharge custRecharge) {
custRecharge.setBusinessId(businessId);
CyPersistModel data = custRechargeServiceImpl.removeLogical(custRecharge);
return CyResultGenUtil.builder(data,
CyMessCons.MESSAGE_ALERT_SUCCESS,
CyMessCons.MESSAGE_ALERT_ERROR,
businessId);
}
//@PreAuthorize("@cyPerm.hasPerm('sys:tRecharge:delete')")
@CyOpeLogAnno(title = "system-客户消费表管理-删除客户消费表", businessType = CyLogTypeEnum.DELETE)
@ApiOperation(value="删除客户消费表", notes="删除客户消费表")
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = true, dataType = "varchar")})
@DeleteMapping("/delete/{businessId:\\w+}")
public CyResult delete(@PathVariable int businessId,CustRecharge custRecharge) {
custRecharge.setBusinessId(businessId);
CyPersistModel data = custRechargeServiceImpl.remove(custRecharge);
return CyResultGenUtil.builder(data,
CyMessCons.MESSAGE_ALERT_SUCCESS,
CyMessCons.MESSAGE_ALERT_ERROR,
businessId);
}
//@PreAuthorize("@cyPerm.hasPerm('sys:tRecharge:update')")
@CyOpeLogAnno(title = "system-客户消费表管理-修改客户消费表", businessType = CyLogTypeEnum.UPDATE)
@ApiOperation(value="修改客户消费表", notes="修改客户消费表")
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = false, dataType = "varchar")})
@PutMapping("/update/{businessId:\\w+}")
public CyResult update(@PathVariable int businessId, @Valid CustRecharge custRecharge, BindingResult bindingResult) {
custRecharge.setBusinessId(businessId);
CyPersistModel data = custRechargeServiceImpl.merge(custRecharge);
return CyResultGenUtil.builder(data,
CyMessCons.MESSAGE_ALERT_SUCCESS,
CyMessCons.MESSAGE_ALERT_ERROR,
custRecharge);
}
//@PreAuthorize("@cyPerm.hasPerm('sys:tRecharge:query')")
@CyOpeLogAnno(title = "system-客户消费表管理-查询客户消费表", businessType = CyLogTypeEnum.QUERY)
@ApiOperation(value="查询单一客户消费表", notes="查询单一客户消费表")
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = true, dataType = "varchar")})
@GetMapping("/detail/{businessId:\\w+}")
public CyResult detail(@PathVariable int businessId) {
return CyResultGenUtil.builder(new CyPersistModel(1),
CyMessCons.MESSAGE_ALERT_SUCCESS,
CyMessCons.MESSAGE_ALERT_ERROR,
custRechargeServiceImpl.findById(businessId));
}
//@PreAuthorize("@cyPerm.hasPerm('sys:tRecharge:list')")
@CyOpeLogAnno(title = "system-客户消费表管理-查询客户消费表", businessType = CyLogTypeEnum.QUERY)
@ApiOperation(value="查询客户消费表集合", notes="查询客户消费表集合")
@GetMapping(value = "/listAll")
public CyResult listAll(CustRecharge custRecharge) {
return CyResultGenUtil.builder(new CyPersistModel(1),
CyMessCons.MESSAGE_ALERT_SUCCESS,
CyMessCons.MESSAGE_ALERT_ERROR,
custRechargeServiceImpl.findAll(custRecharge));
}
//@PreAuthorize("@cyPerm.hasPerm('sys:tRecharge:list')")
@CyOpeLogAnno(title = "system-客户消费表管理-查询客户消费表", businessType = CyLogTypeEnum.QUERY)
@ApiOperation(value="分页查询客户消费表集合", notes="分页查询客户消费表集合")
@GetMapping(value = "/list")
public CyGridModel listByPagination(CustRecharge custRecharge) {
custRechargeServiceImpl.findAllByPagination(getPaginationUtility(), custRecharge);
return getGridModelResponse();
}
@CyOpeLogAnno(title = "system-客户消费表管理-查询客户消费表", businessType = CyLogTypeEnum.EXPORT)
@ApiOperation(value = "导出客户消费表信息", notes = "导出客户消费表信息")
@GetMapping(value = "/export")
public void outCustRecharge(HttpServletResponse response,CustRecharge custRecharge,@PathVariable @RequestParam(defaultValue = "0") String excelId) {
String excelName="";
switch(excelId){
case "0": excelName="客户消费表信息.xls";break;
case "1": excelName="客户消费表信息.xlsx";break;
case "2": excelName="客户消费表信息.csv";break;
}
List<CustRecharge> custRechargeList = custRechargeServiceImpl.export(custRecharge);
CyEpExcelUtil.exportExcel(custRechargeList, "客户消费表信息", "客户消费表信息", CustRecharge.class, excelName, response);
}
}
package org.rcisoft.bus.custrecharge.dao;
import org.rcisoft.core.mapper.CyBaseMapper;
import org.rcisoft.bus.custrecharge.entity.CustRecharge;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
import org.rcisoft.core.model.CyPageInfo;
import org.apache.ibatis.annotations.Param;
import com.baomidou.mybatisplus.core.metadata.IPage;
import java.util.List;
/**
* Created with cy on 2024年12月13日 上午11:27:11.
*/
public interface CustRechargeRepository extends CyBaseMapper<CustRecharge> {
List<CustRecharge> queryCustRecharges(@Param("entity") CustRecharge custRecharge);
/**
* 分页查询 custRecharge
*
*/
IPage<CustRecharge> queryCustRechargesPaged(CyPageInfo cyPageInfo,@Param("entity") CustRecharge custRecharge);
}
package org.rcisoft.bus.custrecharge.entity;
import cn.afterturn.easypoi.excel.annotation.Excel;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.*;
import org.rcisoft.core.entity.CyIdIncreEntity;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
/**
* Created with cy on 2024年12月13日 上午11:27:11.
*/
@Data
@TableName("cust_recharge")
public class CustRecharge extends CyIdIncreEntity<CustRecharge> {
/**
* @desc 客户
* @column customer_id
* @default
*/
@Excel(name = "客户", orderNum = "0", width = 20)
private String customerId;
/**
* @desc 实际充值
* @column actual_recharge
* @default
*/
@Excel(name = "实际充值", orderNum = "1", width = 20)
private BigDecimal actualRecharge;
/**
* @desc 实际到账
* @column actual_receipt
* @default
*/
@Excel(name = "实际到账", orderNum = "2", width = 20)
private BigDecimal actualReceipt;
/**
* @desc 消费订单号
* @column order_number
* @default
*/
@Excel(name = "消费订单号", orderNum = "3", width = 20)
private String orderNumber;
/**
* @desc 消费金额
* @column consumption_amount
* @default
*/
@Excel(name = "消费金额", orderNum = "4", width = 20)
private BigDecimal consumptionAmount;
/**
* @desc 充值/消费余额
* @column customer_balance
* @default
*/
@Excel(name = "充值/消费余额", orderNum = "5", width = 20)
private BigDecimal customerBalance;
/**
* @desc 门店
* @column store_id
* @default
*/
@Excel(name = "门店", orderNum = "6", width = 20)
private String storeId;
/**
* @desc (0消费 1充值)
* @column is_recharge
* @default
*/
@Excel(name = "(0消费 1充值)", orderNum = "7", width = 20)
private String isRecharge;
/**
* 开始时间
*/
@JsonIgnore
@TableField(exist = false)
private String beginTime;
/**
* 结束时间
*/
@JsonIgnore
@TableField(exist = false)
private String endTime;
/**
* 修改人名称
*/
@TableField(exist = false)
private String createName;
/**
* 门店名称
*/
@TableField(exist = false)
private String store;
}
package org.rcisoft.bus.custrecharge.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.rcisoft.bus.custrecharge.entity.CustRecharge;
import org.rcisoft.core.model.CyPersistModel;
import org.rcisoft.core.aop.CyPageUtilAsp;
import org.rcisoft.core.model.CyPageInfo;
import java.util.List;
/**
* Created by cy on 2024年12月13日 上午11:27:11.
*/
public interface CustRechargeService {
/**
* 保存 客户消费表
* @param custRecharge
* @return
*/
CyPersistModel persist(CustRecharge custRecharge);
/**
* 删除 客户消费表
* @param custRecharge
* @return
*/
CyPersistModel remove(CustRecharge custRecharge);
/**
* 逻辑删除 客户消费表
* @param custRecharge
* @return
*/
CyPersistModel removeLogical(CustRecharge custRecharge);
/**
* 修改 客户消费表
* @param custRecharge
* @return
*/
CyPersistModel merge(CustRecharge custRecharge);
/**
* 根据id查询 客户消费表
* @param id
* @return
*/
CustRecharge findById(int id);
/**
* 分页查询 客户消费表
* @param custRecharge
* @return
*/
IPage<CustRecharge> findAllByPagination(CyPageInfo<CustRecharge> paginationUtility,
CustRecharge custRecharge);
/**
* 查询list 客户消费表
* @param custRecharge
* @return
*/
List<CustRecharge> findAll(CustRecharge custRecharge);
/**
* 导出客户消费表
* @return
*/
List<CustRecharge> export(CustRecharge custRecharge);
}
package org.rcisoft.bus.custrecharge.service.impl;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
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.impl.ServiceImpl;
import org.rcisoft.core.util.CyUserUtil;
import org.rcisoft.core.aop.CyPageUtilAsp;
import org.rcisoft.core.model.CyPersistModel;
import org.rcisoft.core.util.CyEpExcelUtil;
import org.rcisoft.bus.custrecharge.dao.CustRechargeRepository;
import org.rcisoft.bus.custrecharge.entity.CustRecharge;
import org.rcisoft.bus.custrecharge.service.CustRechargeService;
import org.rcisoft.core.service.CyBaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import org.rcisoft.core.model.CyPageInfo;
import java.util.List;
import lombok.extern.slf4j.Slf4j;
/**
* Created by cy on 2024年12月13日 上午11:27:11.
*/
@Service
@Transactional(readOnly = true,propagation = Propagation.NOT_SUPPORTED)
@Slf4j
public class CustRechargeServiceImpl extends ServiceImpl<CustRechargeRepository,CustRecharge> implements CustRechargeService {
/**
* 保存 客户消费表
* @param custRecharge
* @return
*/
@Transactional(propagation = Propagation.REQUIRED,isolation = Isolation.DEFAULT)
@Override
public CyPersistModel persist(CustRecharge custRecharge){
//增加操作
int line = baseMapper.insert(custRecharge);
log.debug(CyUserUtil.getAuthenUsername()+"新增了ID为"+
custRecharge.getBusinessId()+"的客户消费表信息");
return new CyPersistModel(line);
}
/**
* 删除 客户消费表
* @param custRecharge
* @return
*/
@Transactional(propagation = Propagation.REQUIRED,isolation = Isolation.DEFAULT)
@Override
public CyPersistModel remove(CustRecharge custRecharge){
int line = baseMapper.realDelete(custRecharge);
log.debug(CyUserUtil.getAuthenUsername()+"删除了ID为"+
custRecharge.getBusinessId()+"的客户消费表信息");
return new CyPersistModel(line);
}
/**
* 逻辑删除 客户消费表
* @param custRecharge
* @return
*/
@Transactional(propagation = Propagation.REQUIRED,isolation = Isolation.DEFAULT)
@Override
public CyPersistModel removeLogical(CustRecharge custRecharge){
custRecharge.setDeleted();
int line = baseMapper.deleteById(custRecharge);
log.debug(CyUserUtil.getAuthenUsername()+"逻辑删除了ID为"+
custRecharge.getBusinessId()+"的客户消费表信息");
return new CyPersistModel(line);
}
/**
* 修改 客户消费表
* @param custRecharge
* @return
*/
@Transactional(propagation = Propagation.REQUIRED,isolation = Isolation.DEFAULT)
@Override
public CyPersistModel merge(CustRecharge custRecharge){
int line = baseMapper.updateById(custRecharge);
log.debug(CyUserUtil.getAuthenUsername()+"修改了ID为"+ custRecharge.getBusinessId()+"的客户消费表信息");
return new CyPersistModel(line);
}
/**
* 根据id查询 客户消费表
* @param id
* @return
*/
@Override
public CustRecharge findById(int id){
return baseMapper.selectById(id);
}
/**
* 分页查询 客户消费表
* @param custRecharge
* @return
*/
@Override
public IPage<CustRecharge> findAllByPagination(CyPageInfo<CustRecharge> paginationUtility,
CustRecharge custRecharge){
return baseMapper.queryCustRechargesPaged(paginationUtility,custRecharge);
}
/**
* 查询list 客户消费表
* @param custRecharge
* @return
*/
@Override
public List<CustRecharge> findAll(CustRecharge custRecharge){
return baseMapper.queryCustRecharges(custRecharge);
}
/**
* 导出客户消费表
* @return
*/
@Override
public List<CustRecharge> export(CustRecharge custRecharge) {
List<CustRecharge> custRechargeList = baseMapper.queryCustRecharges(custRecharge);
return custRechargeList;
}
}
......@@ -69,7 +69,11 @@ public class WmsGoodsPrice extends CyIdIncreEntity<WmsGoodsPrice> {
@TableField(exist = false)
private String endTime;
/**
* 修改人名称
*/
@TableField(exist = false)
private String updateName;
}
......@@ -21,11 +21,13 @@
<!--<cache type="${corePackag!}.util.RedisCache"/>-->
<select id="queryCustInfos" resultMap="BaseResultMap">
select * from cust_info
select *,create_tb.name as create_name
from cust_info as cio
left join sys_user as create_tb on cio.create_by = create_tb.business_id
where 1=1
and del_flag = '0'
and cio.del_flag = '0'
<if test="entity.flag !=null and entity.flag != '' ">
and flag = #{entity.flag}
and cio.flag = #{entity.flag}
</if>
<if test="entity.customerName !=null and entity.customerName != '' ">
and customer_name like concat('%',#{entity.customerName},'%')
......@@ -39,6 +41,12 @@
<if test="entity.endTime !=null and entity.endTime != '' ">
and customer_birthday &lt;= #{entity.endTime}
</if>
<if test="entity.startTime !=null and entity.startTime != '' ">
and cio.create_date &gt;= #{entity.startTime}
</if>
<if test="entity.finishTime !=null and entity.finishTime != '' ">
and cio.create_date &lt;= #{entity.finishTime}
</if>
<if test="entity.customerTelephone !=null and entity.customerTelephone != '' ">
and customer_telephone like concat('%',#{entity.customerTelephone},'%')
</if>
......@@ -48,15 +56,17 @@
<if test="entity.storeId !=null and entity.storeId != '' ">
and store_id like concat('%',#{entity.storeId},'%')
</if>
ORDER BY business_id DESC
ORDER BY cio.business_id DESC
</select>
<select id="queryCustInfosPaged" resultMap="BaseResultMap">
select * from cust_info
select *,create_tb.name as create_name
from cust_info as cio
left join sys_user as create_tb on cio.create_by = create_tb.business_id
where 1=1
and del_flag = '0'
and cio.del_flag = '0'
<if test="entity.flag !=null and entity.flag != '' ">
and flag = #{entity.flag}
and cio.flag = #{entity.flag}
</if>
<if test="entity.customerName !=null and entity.customerName != '' ">
and customer_name like concat('%',#{entity.customerName},'%')
......@@ -70,6 +80,12 @@
<if test="entity.endTime !=null and entity.endTime != '' ">
and customer_birthday &lt;= #{entity.endTime}
</if>
<if test="entity.startTime !=null and entity.startTime != '' ">
and cio.create_date &gt;= #{entity.startTime}
</if>
<if test="entity.finishTime !=null and entity.finishTime != '' ">
and cio.create_date &lt;= #{entity.finishTime}
</if>
<if test="entity.customerTelephone !=null and entity.customerTelephone != '' ">
and customer_telephone like concat('%',#{entity.customerTelephone},'%')
</if>
......@@ -79,6 +95,6 @@
<if test="entity.storeId !=null and entity.storeId != '' ">
and store_id like concat('%',#{entity.storeId},'%')
</if>
ORDER BY business_id DESC
ORDER BY cio.business_id DESC
</select>
</mapper>
\ No newline at end of file
<?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="org.rcisoft.bus.custrecharge.dao.CustRechargeRepository">
<resultMap id="BaseResultMap" type="org.rcisoft.bus.custrecharge.entity.CustRecharge">
<id column="business_id" jdbcType="INTEGER" property="businessId"/>
<result column="customer_id" jdbcType="VARCHAR" property="customerId"/>
<result column="actual_recharge" jdbcType="DECIMAL" property="actualRecharge"/>
<result column="actual_receipt" jdbcType="DECIMAL" property="actualReceipt"/>
<result column="order_number" jdbcType="VARCHAR" property="orderNumber"/>
<result column="consumption_amount" jdbcType="DECIMAL" property="consumptionAmount"/>
<result column="customer_balance" jdbcType="DECIMAL" property="customerBalance"/>
<result column="store_id" jdbcType="VARCHAR" property="storeId"/>
<result column="is_recharge" jdbcType="CHAR" property="isRecharge"/>
<result column="flag" jdbcType="CHAR" property="flag"/>
<result column="del_flag" jdbcType="CHAR" property="delFlag"/>
<result column="create_by" jdbcType="VARCHAR" property="createBy"/>
<result column="create_date" jdbcType="TIMESTAMP" property="createDate"/>
<result column="update_by" jdbcType="VARCHAR" property="updateBy"/>
<result column="update_date" jdbcType="TIMESTAMP" property="updateDate"/>
<result column="remarks" jdbcType="VARCHAR" property="remarks"/>
</resultMap>
<!--<cache type="${corePackag!}.util.RedisCache"/>-->
<select id="queryCustRecharges" resultMap="BaseResultMap">
select *,create_tb.name as create_name
from cust_recharge as cre
left join sys_user as create_tb on cre.create_by = create_tb.business_id
where 1=1
and cre.del_flag = '0'
<if test="entity.flag !=null and entity.flag != '' ">
and cre.flag = #{entity.flag}
</if>
<if test="entity.customerId !=null and entity.customerId != '' ">
and customer_id like concat('%',#{entity.customerId},'%')
</if>
<if test="entity.actualRecharge !=null and entity.actualRecharge != '' ">
and actual_recharge = #{entity.actualRecharge}
</if>
<if test="entity.actualReceipt !=null and entity.actualReceipt != '' ">
and actual_receipt = #{entity.actualReceipt}
</if>
<if test="entity.orderNumber !=null and entity.orderNumber != '' ">
and order_number like concat('%',#{entity.orderNumber},'%')
</if>
<if test="entity.consumptionAmount !=null and entity.consumptionAmount != '' ">
and consumption_amount = #{entity.consumptionAmount}
</if>
<if test="entity.beginTime !=null and entity.beginTime != '' ">
and cre.create_date &gt;= #{entity.beginTime}
</if>
<if test="entity.endTime !=null and entity.endTime != '' ">
and cre.create_date &lt;= #{entity.endTime}
</if>
<if test="entity.customerBalance !=null and entity.customerBalance != '' ">
and customer_balance = #{entity.customerBalance}
</if>
<if test="entity.storeId !=null and entity.storeId != '' ">
and store_id like concat('%',#{entity.storeId},'%')
</if>
<if test="entity.isRecharge !=null and entity.isRecharge != '' ">
and is_recharge = #{entity.isRecharge}
</if>
ORDER BY cre.business_id DESC
</select>
<select id="queryCustRechargesPaged" resultMap="BaseResultMap">
select *,create_tb.name as create_name
from cust_recharge as cre
left join sys_user as create_tb on cre.create_by = create_tb.business_id
where 1=1
and cre.del_flag = '0'
<if test="entity.flag !=null and entity.flag != '' ">
and cre.flag = #{entity.flag}
</if>
<if test="entity.customerId !=null and entity.customerId != '' ">
and customer_id like concat('%',#{entity.customerId},'%')
</if>
<if test="entity.actualRecharge !=null and entity.actualRecharge != '' ">
and actual_recharge = #{entity.actualRecharge}
</if>
<if test="entity.actualReceipt !=null and entity.actualReceipt != '' ">
and actual_receipt = #{entity.actualReceipt}
</if>
<if test="entity.orderNumber !=null and entity.orderNumber != '' ">
and order_number like concat('%',#{entity.orderNumber},'%')
</if>
<if test="entity.consumptionAmount !=null and entity.consumptionAmount != '' ">
and consumption_amount = #{entity.consumptionAmount}
</if>
<if test="entity.beginTime !=null and entity.beginTime != '' ">
and cre.create_date &gt;= #{entity.beginTime}
</if>
<if test="entity.endTime !=null and entity.endTime != '' ">
and cre.create_date &lt;= #{entity.endTime}
</if>
<if test="entity.customerBalance !=null and entity.customerBalance != '' ">
and customer_balance = #{entity.customerBalance}
</if>
<if test="entity.storeId !=null and entity.storeId != '' ">
and store_id like concat('%',#{entity.storeId},'%')
</if>
<if test="entity.isRecharge !=null and entity.isRecharge != '' ">
and is_recharge = #{entity.isRecharge}
</if>
ORDER BY cre.business_id DESC
</select>
</mapper>
\ No newline at end of file
......@@ -18,11 +18,13 @@
<!--<cache type="${corePackag!}.util.RedisCache"/>-->
<select id="queryWmsGoodsPrices" resultMap="BaseResultMap">
select * from wms_goods_price
select * ,create_tb.name as update_name
from wms_goods_price as wgp
left join sys_user as create_tb on wgp.create_by = create_tb.business_id
where 1=1
and del_flag = '0'
and wgp.del_flag = '0'
<if test="entity.flag !=null and entity.flag != '' ">
and flag = #{entity.flag}
and wgp.flag = #{entity.flag}
</if>
<if test="entity.goodsArtNumber !=null and entity.goodsArtNumber != '' ">
and goods_art_number like concat('%',#{entity.goodsArtNumber},'%')
......@@ -37,20 +39,22 @@
and store_price = #{entity.storePrice}
</if>
<if test="entity.beginTime !=null and entity.beginTime != '' ">
and update_date >= #{entity.beginTime}
and wgp.update_date >= #{entity.beginTime}
</if>
<if test="entity.endTime !=null and entity.endTime != '' ">
and update_date &lt;= #{entity.endTime}
and wgp.update_date &lt;= #{entity.endTime}
</if>
ORDER BY business_id DESC
ORDER BY wgp.business_id DESC
</select>
<select id="queryWmsGoodsPricesPaged" resultMap="BaseResultMap">
select * from wms_goods_price
select * ,create_tb.name as update_name
from wms_goods_price as wgp
left join sys_user as create_tb on wgp.create_by = create_tb.business_id
where 1=1
and del_flag = '0'
and wgp.del_flag = '0'
<if test="entity.flag !=null and entity.flag != '' ">
and flag = #{entity.flag}
and wgp.flag = #{entity.flag}
</if>
<if test="entity.goodsArtNumber !=null and entity.goodsArtNumber != '' ">
and goods_art_number like concat('%',#{entity.goodsArtNumber},'%')
......@@ -65,11 +69,11 @@
and store_price = #{entity.storePrice}
</if>
<if test="entity.beginTime !=null and entity.beginTime != '' ">
and update_date >= #{entity.beginTime}
and wgp.update_date >= #{entity.beginTime}
</if>
<if test="entity.endTime !=null and entity.endTime != '' ">
and update_date &lt;= #{entity.endTime}
and wgp.update_date &lt;= #{entity.endTime}
</if>
ORDER BY business_id DESC
ORDER BY wgp.business_id DESC
</select>
</mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment