WEB:客户管理

This commit is contained in:
2025-07-03 15:30:18 +08:00
parent 5bc56ca36d
commit 4e83e3570a
5 changed files with 12 additions and 14 deletions

View File

@ -136,7 +136,7 @@ tenant:
# https://baomidou.com/config/ # https://baomidou.com/config/
mybatis-plus: mybatis-plus:
# 自定义配置 是否全局开启逻辑删除 关闭后 所有逻辑删除功能将失效 # 自定义配置 是否全局开启逻辑删除 关闭后 所有逻辑删除功能将失效
enableLogicDelete: true enableLogicDelete: false
# 多包名使用 例如 com.fuyuanshen.**.mapper,org.xxx.**.mapper # 多包名使用 例如 com.fuyuanshen.**.mapper,org.xxx.**.mapper
mapperPackage: com.fuyuanshen.**.mapper mapperPackage: com.fuyuanshen.**.mapper
# 对应的 XML 文件位置 # 对应的 XML 文件位置

View File

@ -15,6 +15,7 @@
*/ */
package com.fuyuanshen.customer.domain.query; package com.fuyuanshen.customer.domain.query;
import com.fuyuanshen.common.mybatis.core.domain.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
@ -29,7 +30,7 @@ import java.util.Set;
* @date 2018-11-23 * @date 2018-11-23
*/ */
@Data @Data
public class UserQueryCriteria implements Serializable { public class UserQueryCriteria extends BaseEntity {
@Schema(name = "ID") @Schema(name = "ID")
private Long id; private Long id;
@ -52,8 +53,8 @@ public class UserQueryCriteria implements Serializable {
@Schema(name = "部门ID") @Schema(name = "部门ID")
private Long deptId; private Long deptId;
@Schema(name = "创建时间") // @Schema(name = "创建时间")
private List<Timestamp> createTime; // // private List<Timestamp> createTime;
@Schema(name = "页码", example = "1") @Schema(name = "页码", example = "1")
private Integer pageNum = 1; private Integer pageNum = 1;

View File

@ -16,7 +16,6 @@ import java.util.Set;
*/ */
public interface CustomerService { public interface CustomerService {
/** /**
* 分页查询客户 * 分页查询客户
* *
@ -26,7 +25,6 @@ public interface CustomerService {
*/ */
TableDataInfo<ConsumerVo> queryCustomers(UserQueryCriteria criteria, Page<Customer> page); TableDataInfo<ConsumerVo> queryCustomers(UserQueryCriteria criteria, Page<Customer> page);
/** /**
* 查询所有客户 * 查询所有客户
* *
@ -58,5 +56,4 @@ public interface CustomerService {
void delete(Set<Long> ids); void delete(Set<Long> ids);
} }

View File

@ -45,7 +45,7 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerMapper, Customer> i
List<ConsumerVo> consumerVoList = BeanUtil.copyToList(users, ConsumerVo.class); List<ConsumerVo> consumerVoList = BeanUtil.copyToList(users, ConsumerVo.class);
Long total = customerMapper.countCustomers(criteria); Long total = customerMapper.countCustomers(criteria);
// return PageUtil.toPage(consumerVoList, total); // return PageUtil.toPage(consumerVoList, total);
return new TableDataInfo<ConsumerVo>(consumerVoList, total); return new TableDataInfo<ConsumerVo>(consumerVoList, total);
} }
@ -94,7 +94,7 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerMapper, Customer> i
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public void updateCustomer(Customer resources) throws Exception { public void updateCustomer(Customer resources) throws Exception {
saveOrUpdate(resources);
} }
@ -106,7 +106,7 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerMapper, Customer> i
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public void delete(Set<Long> ids) { public void delete(Set<Long> ids) {
customerMapper.deleteByIds(ids);
} }

View File

@ -112,8 +112,8 @@
<if test="criteria.enabled != null"> <if test="criteria.enabled != null">
and u.enabled = #{criteria.enabled} and u.enabled = #{criteria.enabled}
</if> </if>
<if test="criteria.createTime != null and criteria.createTime.size() != 0"> <if test="criteria.params.beginTime != null and criteria.params.endTime != null">
and u.create_time between #{criteria.createTime[0]} and #{criteria.createTime[1]} and u.create_time between #{criteria.params.beginTime} and #{criteria.params.endTime}
</if> </if>
</where> </where>
order by u.user_id desc order by u.user_id desc
@ -142,8 +142,8 @@
<if test="criteria.enabled != null"> <if test="criteria.enabled != null">
and u.enabled = #{criteria.enabled} and u.enabled = #{criteria.enabled}
</if> </if>
<if test="criteria.createTime != null and criteria.createTime.size() != 0"> <if test="criteria.params.beginTime != null and criteria.params.endTime != null">
and u.create_time between #{criteria.createTime[0]} and #{criteria.createTime[1]} and u.create_time between #{criteria.params.beginTime} and #{criteria.params.endTime}
</if> </if>
</where> </where>
</select> </select>