16 changed files with 1009 additions and 0 deletions
@ -0,0 +1,79 @@ |
|||||
|
package com.epmet.dto; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.Date; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 社区治理人员 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2023-11-27 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class CustomerCommunityManageUserDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* ID 唯一标识 |
||||
|
*/ |
||||
|
private String id; |
||||
|
|
||||
|
/** |
||||
|
* 客户ID |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 社区id |
||||
|
*/ |
||||
|
private String communityId; |
||||
|
|
||||
|
/** |
||||
|
* 姓名 |
||||
|
*/ |
||||
|
private String name; |
||||
|
|
||||
|
/** |
||||
|
* 手机号 |
||||
|
*/ |
||||
|
private String mobile; |
||||
|
|
||||
|
/** |
||||
|
* 1:处级干部包联社区2:一线工作组3:党建指导员4:社区书记5:社区副书记6:党委委员 |
||||
|
*/ |
||||
|
private String type; |
||||
|
|
||||
|
/** |
||||
|
* 删除标识:0.未删除 1.已删除 |
||||
|
*/ |
||||
|
private Integer delFlag; |
||||
|
|
||||
|
/** |
||||
|
* 乐观锁 |
||||
|
*/ |
||||
|
private Integer revision; |
||||
|
|
||||
|
/** |
||||
|
* 创建人 |
||||
|
*/ |
||||
|
private String createdBy; |
||||
|
|
||||
|
/** |
||||
|
* 更新人 |
||||
|
*/ |
||||
|
private String updatedBy; |
||||
|
|
||||
|
/** |
||||
|
* 创建时间 |
||||
|
*/ |
||||
|
private Date createdTime; |
||||
|
|
||||
|
/** |
||||
|
* 更新时间 |
||||
|
*/ |
||||
|
private Date updatedTime; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,84 @@ |
|||||
|
package com.epmet.dto; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.Date; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 网格治理人员 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2023-11-27 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class CustomerGridManageUserDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* ID 唯一标识 |
||||
|
*/ |
||||
|
private String id; |
||||
|
|
||||
|
/** |
||||
|
* 客户ID |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 网格id |
||||
|
*/ |
||||
|
private String gridId; |
||||
|
|
||||
|
/** |
||||
|
* 姓名 |
||||
|
*/ |
||||
|
private String name; |
||||
|
|
||||
|
/** |
||||
|
* 手机号 |
||||
|
*/ |
||||
|
private String mobile; |
||||
|
|
||||
|
/** |
||||
|
* 人员属性 |
||||
|
*/ |
||||
|
private String property; |
||||
|
|
||||
|
/** |
||||
|
* 1:专职网格员2:北上速办专职3:专业网格管理员4:兼职网格管理员 |
||||
|
*/ |
||||
|
private String type; |
||||
|
|
||||
|
/** |
||||
|
* 删除标识:0.未删除 1.已删除 |
||||
|
*/ |
||||
|
private Integer delFlag; |
||||
|
|
||||
|
/** |
||||
|
* 乐观锁 |
||||
|
*/ |
||||
|
private Integer revision; |
||||
|
|
||||
|
/** |
||||
|
* 创建人 |
||||
|
*/ |
||||
|
private String createdBy; |
||||
|
|
||||
|
/** |
||||
|
* 更新人 |
||||
|
*/ |
||||
|
private String updatedBy; |
||||
|
|
||||
|
/** |
||||
|
* 创建时间 |
||||
|
*/ |
||||
|
private Date createdTime; |
||||
|
|
||||
|
/** |
||||
|
* 更新时间 |
||||
|
*/ |
||||
|
private Date updatedTime; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,88 @@ |
|||||
|
package com.epmet.controller; |
||||
|
|
||||
|
import com.epmet.commons.tools.aop.NoRepeatSubmit; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.commons.tools.utils.ExcelUtils; |
||||
|
import com.epmet.commons.tools.utils.Result; |
||||
|
import com.epmet.commons.tools.validator.AssertUtils; |
||||
|
import com.epmet.commons.tools.validator.ValidatorUtils; |
||||
|
import com.epmet.commons.tools.validator.group.AddGroup; |
||||
|
import com.epmet.commons.tools.validator.group.UpdateGroup; |
||||
|
import com.epmet.commons.tools.validator.group.DefaultGroup; |
||||
|
import com.epmet.dto.CustomerCommunityManageUserDTO; |
||||
|
import com.epmet.excel.CustomerCommunityManageUserExcel; |
||||
|
import com.epmet.service.CustomerCommunityManageUserService; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
|
||||
|
import javax.servlet.http.HttpServletResponse; |
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 社区治理人员 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2023-11-27 |
||||
|
*/ |
||||
|
@RestController |
||||
|
@RequestMapping("customerCommunityManageUser") |
||||
|
public class CustomerCommunityManageUserController { |
||||
|
|
||||
|
@Autowired |
||||
|
private CustomerCommunityManageUserService customerCommunityManageUserService; |
||||
|
|
||||
|
@RequestMapping("page") |
||||
|
public Result<PageData<CustomerCommunityManageUserDTO>> page(@RequestParam Map<String, Object> params){ |
||||
|
PageData<CustomerCommunityManageUserDTO> page = customerCommunityManageUserService.page(params); |
||||
|
return new Result<PageData<CustomerCommunityManageUserDTO>>().ok(page); |
||||
|
} |
||||
|
|
||||
|
@RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET}) |
||||
|
public Result<CustomerCommunityManageUserDTO> get(@PathVariable("id") String id){ |
||||
|
CustomerCommunityManageUserDTO data = customerCommunityManageUserService.get(id); |
||||
|
return new Result<CustomerCommunityManageUserDTO>().ok(data); |
||||
|
} |
||||
|
|
||||
|
@NoRepeatSubmit |
||||
|
@PostMapping("save") |
||||
|
public Result save(@RequestBody CustomerCommunityManageUserDTO dto){ |
||||
|
//效验数据
|
||||
|
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
||||
|
customerCommunityManageUserService.save(dto); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@NoRepeatSubmit |
||||
|
@PostMapping("update") |
||||
|
public Result update(@RequestBody CustomerCommunityManageUserDTO dto){ |
||||
|
//效验数据
|
||||
|
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
||||
|
customerCommunityManageUserService.update(dto); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@PostMapping("delete") |
||||
|
public Result delete(@RequestBody String[] ids){ |
||||
|
//效验数据
|
||||
|
AssertUtils.isArrayEmpty(ids, "id"); |
||||
|
customerCommunityManageUserService.delete(ids); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@GetMapping("export") |
||||
|
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { |
||||
|
List<CustomerCommunityManageUserDTO> list = customerCommunityManageUserService.list(params); |
||||
|
ExcelUtils.exportExcelToTarget(response, null, list, CustomerCommunityManageUserExcel.class); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
@GetMapping("screen/listForCommnity") |
||||
|
public Result<List<CustomerCommunityManageUserDTO>> listForCommnity(String communityId,String type){ |
||||
|
List<CustomerCommunityManageUserDTO> result = customerCommunityManageUserService.listForCommnity(communityId,type); |
||||
|
return new Result<List<CustomerCommunityManageUserDTO>>().ok(result); |
||||
|
} |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,89 @@ |
|||||
|
package com.epmet.controller; |
||||
|
|
||||
|
import com.epmet.commons.tools.aop.NoRepeatSubmit; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.commons.tools.utils.ExcelUtils; |
||||
|
import com.epmet.commons.tools.utils.Result; |
||||
|
import com.epmet.commons.tools.validator.AssertUtils; |
||||
|
import com.epmet.commons.tools.validator.ValidatorUtils; |
||||
|
import com.epmet.commons.tools.validator.group.AddGroup; |
||||
|
import com.epmet.commons.tools.validator.group.UpdateGroup; |
||||
|
import com.epmet.commons.tools.validator.group.DefaultGroup; |
||||
|
import com.epmet.dto.CustomerCommunityManageUserDTO; |
||||
|
import com.epmet.dto.CustomerGridManageUserDTO; |
||||
|
import com.epmet.excel.CustomerGridManageUserExcel; |
||||
|
import com.epmet.service.CustomerGridManageUserService; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
|
||||
|
import javax.servlet.http.HttpServletResponse; |
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 网格治理人员 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2023-11-27 |
||||
|
*/ |
||||
|
@RestController |
||||
|
@RequestMapping("customerGridManageUser") |
||||
|
public class CustomerGridManageUserController { |
||||
|
|
||||
|
@Autowired |
||||
|
private CustomerGridManageUserService customerGridManageUserService; |
||||
|
|
||||
|
@RequestMapping("page") |
||||
|
public Result<PageData<CustomerGridManageUserDTO>> page(@RequestParam Map<String, Object> params){ |
||||
|
PageData<CustomerGridManageUserDTO> page = customerGridManageUserService.page(params); |
||||
|
return new Result<PageData<CustomerGridManageUserDTO>>().ok(page); |
||||
|
} |
||||
|
|
||||
|
@RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET}) |
||||
|
public Result<CustomerGridManageUserDTO> get(@PathVariable("id") String id){ |
||||
|
CustomerGridManageUserDTO data = customerGridManageUserService.get(id); |
||||
|
return new Result<CustomerGridManageUserDTO>().ok(data); |
||||
|
} |
||||
|
|
||||
|
@NoRepeatSubmit |
||||
|
@PostMapping("save") |
||||
|
public Result save(@RequestBody CustomerGridManageUserDTO dto){ |
||||
|
//效验数据
|
||||
|
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
||||
|
customerGridManageUserService.save(dto); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@NoRepeatSubmit |
||||
|
@PostMapping("update") |
||||
|
public Result update(@RequestBody CustomerGridManageUserDTO dto){ |
||||
|
//效验数据
|
||||
|
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
||||
|
customerGridManageUserService.update(dto); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@PostMapping("delete") |
||||
|
public Result delete(@RequestBody String[] ids){ |
||||
|
//效验数据
|
||||
|
AssertUtils.isArrayEmpty(ids, "id"); |
||||
|
customerGridManageUserService.delete(ids); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@GetMapping("export") |
||||
|
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { |
||||
|
List<CustomerGridManageUserDTO> list = customerGridManageUserService.list(params); |
||||
|
ExcelUtils.exportExcelToTarget(response, null, list, CustomerGridManageUserExcel.class); |
||||
|
} |
||||
|
|
||||
|
@GetMapping("screen/listForGrid") |
||||
|
public Result<List<CustomerGridManageUserDTO>> listForGrid(String gridId, String type){ |
||||
|
List<CustomerGridManageUserDTO> result = customerGridManageUserService.listForCommnity(gridId,type); |
||||
|
return new Result<List<CustomerGridManageUserDTO>>().ok(result); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
} |
||||
@ -0,0 +1,16 @@ |
|||||
|
package com.epmet.dao; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.dao.BaseDao; |
||||
|
import com.epmet.entity.CustomerCommunityManageUserEntity; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
|
||||
|
/** |
||||
|
* 社区治理人员 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2023-11-27 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface CustomerCommunityManageUserDao extends BaseDao<CustomerCommunityManageUserEntity> { |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,16 @@ |
|||||
|
package com.epmet.dao; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.dao.BaseDao; |
||||
|
import com.epmet.entity.CustomerGridManageUserEntity; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
|
||||
|
/** |
||||
|
* 网格治理人员 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2023-11-27 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface CustomerGridManageUserDao extends BaseDao<CustomerGridManageUserEntity> { |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,49 @@ |
|||||
|
package com.epmet.entity; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
||||
|
import lombok.Data; |
||||
|
import lombok.EqualsAndHashCode; |
||||
|
|
||||
|
import java.util.Date; |
||||
|
|
||||
|
/** |
||||
|
* 社区治理人员 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2023-11-27 |
||||
|
*/ |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper=false) |
||||
|
@TableName("customer_community_manage_user") |
||||
|
public class CustomerCommunityManageUserEntity extends BaseEpmetEntity { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 客户ID |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 社区id |
||||
|
*/ |
||||
|
private String communityId; |
||||
|
|
||||
|
/** |
||||
|
* 姓名 |
||||
|
*/ |
||||
|
private String name; |
||||
|
|
||||
|
/** |
||||
|
* 手机号 |
||||
|
*/ |
||||
|
private String mobile; |
||||
|
|
||||
|
/** |
||||
|
* 1:处级干部包联社区2:一线工作组3:党建指导员4:社区书记5:社区副书记6:党委委员 |
||||
|
*/ |
||||
|
private String type; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,54 @@ |
|||||
|
package com.epmet.entity; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
||||
|
import lombok.Data; |
||||
|
import lombok.EqualsAndHashCode; |
||||
|
|
||||
|
import java.util.Date; |
||||
|
|
||||
|
/** |
||||
|
* 网格治理人员 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2023-11-27 |
||||
|
*/ |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper=false) |
||||
|
@TableName("customer_grid_manage_user") |
||||
|
public class CustomerGridManageUserEntity extends BaseEpmetEntity { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 客户ID |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 网格id |
||||
|
*/ |
||||
|
private String gridId; |
||||
|
|
||||
|
/** |
||||
|
* 姓名 |
||||
|
*/ |
||||
|
private String name; |
||||
|
|
||||
|
/** |
||||
|
* 手机号 |
||||
|
*/ |
||||
|
private String mobile; |
||||
|
|
||||
|
/** |
||||
|
* 人员属性 |
||||
|
*/ |
||||
|
private String property; |
||||
|
|
||||
|
/** |
||||
|
* 1:专职网格员2:北上速办专职3:专业网格管理员4:兼职网格管理员 |
||||
|
*/ |
||||
|
private String type; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,54 @@ |
|||||
|
package com.epmet.excel; |
||||
|
|
||||
|
import cn.afterturn.easypoi.excel.annotation.Excel; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.util.Date; |
||||
|
|
||||
|
/** |
||||
|
* 社区治理人员 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2023-11-27 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class CustomerCommunityManageUserExcel { |
||||
|
|
||||
|
@Excel(name = "ID 唯一标识") |
||||
|
private String id; |
||||
|
|
||||
|
@Excel(name = "客户ID") |
||||
|
private String customerId; |
||||
|
|
||||
|
@Excel(name = "社区id") |
||||
|
private String communityId; |
||||
|
|
||||
|
@Excel(name = "姓名") |
||||
|
private String name; |
||||
|
|
||||
|
@Excel(name = "手机号") |
||||
|
private String mobile; |
||||
|
|
||||
|
@Excel(name = "1:处级干部包联社区2:一线工作组3:党建指导员4:社区书记5:社区副书记6:党委委员") |
||||
|
private String type; |
||||
|
|
||||
|
@Excel(name = "删除标识:0.未删除 1.已删除") |
||||
|
private Integer delFlag; |
||||
|
|
||||
|
@Excel(name = "乐观锁") |
||||
|
private Integer revision; |
||||
|
|
||||
|
@Excel(name = "创建人") |
||||
|
private String createdBy; |
||||
|
|
||||
|
@Excel(name = "更新人") |
||||
|
private String updatedBy; |
||||
|
|
||||
|
@Excel(name = "创建时间") |
||||
|
private Date createdTime; |
||||
|
|
||||
|
@Excel(name = "更新时间") |
||||
|
private Date updatedTime; |
||||
|
|
||||
|
|
||||
|
} |
||||
@ -0,0 +1,57 @@ |
|||||
|
package com.epmet.excel; |
||||
|
|
||||
|
import cn.afterturn.easypoi.excel.annotation.Excel; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.util.Date; |
||||
|
|
||||
|
/** |
||||
|
* 网格治理人员 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2023-11-27 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class CustomerGridManageUserExcel { |
||||
|
|
||||
|
@Excel(name = "ID 唯一标识") |
||||
|
private String id; |
||||
|
|
||||
|
@Excel(name = "客户ID") |
||||
|
private String customerId; |
||||
|
|
||||
|
@Excel(name = "网格id") |
||||
|
private String gridId; |
||||
|
|
||||
|
@Excel(name = "姓名") |
||||
|
private String name; |
||||
|
|
||||
|
@Excel(name = "手机号") |
||||
|
private String mobile; |
||||
|
|
||||
|
@Excel(name = "人员属性") |
||||
|
private String property; |
||||
|
|
||||
|
@Excel(name = "1:专职网格员2:北上速办专职3:专业网格管理员4:兼职网格管理员") |
||||
|
private String type; |
||||
|
|
||||
|
@Excel(name = "删除标识:0.未删除 1.已删除") |
||||
|
private Integer delFlag; |
||||
|
|
||||
|
@Excel(name = "乐观锁") |
||||
|
private Integer revision; |
||||
|
|
||||
|
@Excel(name = "创建人") |
||||
|
private String createdBy; |
||||
|
|
||||
|
@Excel(name = "更新人") |
||||
|
private String updatedBy; |
||||
|
|
||||
|
@Excel(name = "创建时间") |
||||
|
private Date createdTime; |
||||
|
|
||||
|
@Excel(name = "更新时间") |
||||
|
private Date updatedTime; |
||||
|
|
||||
|
|
||||
|
} |
||||
@ -0,0 +1,30 @@ |
|||||
|
package com.epmet.redis; |
||||
|
|
||||
|
import com.epmet.commons.tools.redis.RedisUtils; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Component; |
||||
|
|
||||
|
/** |
||||
|
* 社区治理人员 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2023-11-27 |
||||
|
*/ |
||||
|
@Component |
||||
|
public class CustomerCommunityManageUserRedis { |
||||
|
@Autowired |
||||
|
private RedisUtils redisUtils; |
||||
|
|
||||
|
public void delete(Object[] ids) { |
||||
|
|
||||
|
} |
||||
|
|
||||
|
public void set(){ |
||||
|
|
||||
|
} |
||||
|
|
||||
|
public String get(String id){ |
||||
|
return null; |
||||
|
} |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,30 @@ |
|||||
|
package com.epmet.redis; |
||||
|
|
||||
|
import com.epmet.commons.tools.redis.RedisUtils; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Component; |
||||
|
|
||||
|
/** |
||||
|
* 网格治理人员 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2023-11-27 |
||||
|
*/ |
||||
|
@Component |
||||
|
public class CustomerGridManageUserRedis { |
||||
|
@Autowired |
||||
|
private RedisUtils redisUtils; |
||||
|
|
||||
|
public void delete(Object[] ids) { |
||||
|
|
||||
|
} |
||||
|
|
||||
|
public void set(){ |
||||
|
|
||||
|
} |
||||
|
|
||||
|
public String get(String id){ |
||||
|
return null; |
||||
|
} |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,80 @@ |
|||||
|
package com.epmet.service; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.service.BaseService; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.dto.CustomerCommunityManageUserDTO; |
||||
|
import com.epmet.entity.CustomerCommunityManageUserEntity; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* 社区治理人员 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2023-11-27 |
||||
|
*/ |
||||
|
public interface CustomerCommunityManageUserService extends BaseService<CustomerCommunityManageUserEntity> { |
||||
|
|
||||
|
/** |
||||
|
* 默认分页 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return PageData<CustomerCommunityManageUserDTO> |
||||
|
* @author generator |
||||
|
* @date 2023-11-27 |
||||
|
*/ |
||||
|
PageData<CustomerCommunityManageUserDTO> page(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 默认查询 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return java.util.List<CustomerCommunityManageUserDTO> |
||||
|
* @author generator |
||||
|
* @date 2023-11-27 |
||||
|
*/ |
||||
|
List<CustomerCommunityManageUserDTO> list(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 单条查询 |
||||
|
* |
||||
|
* @param id |
||||
|
* @return CustomerCommunityManageUserDTO |
||||
|
* @author generator |
||||
|
* @date 2023-11-27 |
||||
|
*/ |
||||
|
CustomerCommunityManageUserDTO get(String id); |
||||
|
|
||||
|
/** |
||||
|
* 默认保存 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2023-11-27 |
||||
|
*/ |
||||
|
void save(CustomerCommunityManageUserDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 默认更新 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2023-11-27 |
||||
|
*/ |
||||
|
void update(CustomerCommunityManageUserDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 批量删除 |
||||
|
* |
||||
|
* @param ids |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2023-11-27 |
||||
|
*/ |
||||
|
void delete(String[] ids); |
||||
|
|
||||
|
List<CustomerCommunityManageUserDTO> listForCommnity(String communityId, String type); |
||||
|
} |
||||
@ -0,0 +1,80 @@ |
|||||
|
package com.epmet.service; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.service.BaseService; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.dto.CustomerGridManageUserDTO; |
||||
|
import com.epmet.entity.CustomerGridManageUserEntity; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* 网格治理人员 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2023-11-27 |
||||
|
*/ |
||||
|
public interface CustomerGridManageUserService extends BaseService<CustomerGridManageUserEntity> { |
||||
|
|
||||
|
/** |
||||
|
* 默认分页 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return PageData<CustomerGridManageUserDTO> |
||||
|
* @author generator |
||||
|
* @date 2023-11-27 |
||||
|
*/ |
||||
|
PageData<CustomerGridManageUserDTO> page(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 默认查询 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return java.util.List<CustomerGridManageUserDTO> |
||||
|
* @author generator |
||||
|
* @date 2023-11-27 |
||||
|
*/ |
||||
|
List<CustomerGridManageUserDTO> list(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 单条查询 |
||||
|
* |
||||
|
* @param id |
||||
|
* @return CustomerGridManageUserDTO |
||||
|
* @author generator |
||||
|
* @date 2023-11-27 |
||||
|
*/ |
||||
|
CustomerGridManageUserDTO get(String id); |
||||
|
|
||||
|
/** |
||||
|
* 默认保存 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2023-11-27 |
||||
|
*/ |
||||
|
void save(CustomerGridManageUserDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 默认更新 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2023-11-27 |
||||
|
*/ |
||||
|
void update(CustomerGridManageUserDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 批量删除 |
||||
|
* |
||||
|
* @param ids |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2023-11-27 |
||||
|
*/ |
||||
|
void delete(String[] ids); |
||||
|
|
||||
|
List<CustomerGridManageUserDTO> listForCommnity(String gridId, String type); |
||||
|
} |
||||
@ -0,0 +1,101 @@ |
|||||
|
package com.epmet.service.impl; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.commons.tools.utils.ConvertUtils; |
||||
|
import com.epmet.commons.tools.constant.FieldConstant; |
||||
|
import com.epmet.dao.CustomerCommunityManageUserDao; |
||||
|
import com.epmet.dto.CustomerCommunityManageUserDTO; |
||||
|
import com.epmet.entity.CustomerCommunityManageUserEntity; |
||||
|
import com.epmet.redis.CustomerCommunityManageUserRedis; |
||||
|
import com.epmet.service.CustomerCommunityManageUserService; |
||||
|
import org.apache.commons.lang3.StringUtils; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
import org.springframework.transaction.annotation.Transactional; |
||||
|
|
||||
|
import java.util.Arrays; |
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* 社区治理人员 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2023-11-27 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class CustomerCommunityManageUserServiceImpl extends BaseServiceImpl<CustomerCommunityManageUserDao, CustomerCommunityManageUserEntity> implements CustomerCommunityManageUserService { |
||||
|
|
||||
|
@Autowired |
||||
|
private CustomerCommunityManageUserRedis customerCommunityManageUserRedis; |
||||
|
|
||||
|
@Override |
||||
|
public PageData<CustomerCommunityManageUserDTO> page(Map<String, Object> params) { |
||||
|
IPage<CustomerCommunityManageUserEntity> page = baseDao.selectPage( |
||||
|
getPage(params, FieldConstant.CREATED_TIME, false), |
||||
|
getWrapper(params) |
||||
|
); |
||||
|
return getPageData(page, CustomerCommunityManageUserDTO.class); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public List<CustomerCommunityManageUserDTO> list(Map<String, Object> params) { |
||||
|
List<CustomerCommunityManageUserEntity> entityList = baseDao.selectList(getWrapper(params)); |
||||
|
|
||||
|
return ConvertUtils.sourceToTarget(entityList, CustomerCommunityManageUserDTO.class); |
||||
|
} |
||||
|
|
||||
|
private QueryWrapper<CustomerCommunityManageUserEntity> getWrapper(Map<String, Object> params){ |
||||
|
String id = (String)params.get(FieldConstant.ID_HUMP); |
||||
|
|
||||
|
QueryWrapper<CustomerCommunityManageUserEntity> wrapper = new QueryWrapper<>(); |
||||
|
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
||||
|
|
||||
|
return wrapper; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public CustomerCommunityManageUserDTO get(String id) { |
||||
|
CustomerCommunityManageUserEntity entity = baseDao.selectById(id); |
||||
|
return ConvertUtils.sourceToTarget(entity, CustomerCommunityManageUserDTO.class); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void save(CustomerCommunityManageUserDTO dto) { |
||||
|
CustomerCommunityManageUserEntity entity = ConvertUtils.sourceToTarget(dto, CustomerCommunityManageUserEntity.class); |
||||
|
insert(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void update(CustomerCommunityManageUserDTO dto) { |
||||
|
CustomerCommunityManageUserEntity entity = ConvertUtils.sourceToTarget(dto, CustomerCommunityManageUserEntity.class); |
||||
|
updateById(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void delete(String[] ids) { |
||||
|
// 逻辑删除(@TableLogic 注解)
|
||||
|
baseDao.deleteBatchIds(Arrays.asList(ids)); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public List<CustomerCommunityManageUserDTO> listForCommnity(String communityId, String type) { |
||||
|
|
||||
|
|
||||
|
LambdaQueryWrapper<CustomerCommunityManageUserEntity> wrapper = new LambdaQueryWrapper<>(); |
||||
|
wrapper.eq(CustomerCommunityManageUserEntity::getId, communityId) |
||||
|
.eq(CustomerCommunityManageUserEntity::getType, type); |
||||
|
|
||||
|
List<CustomerCommunityManageUserEntity> entityList = baseDao.selectList(wrapper); |
||||
|
|
||||
|
return ConvertUtils.sourceToTarget(entityList, CustomerCommunityManageUserDTO.class); |
||||
|
} |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,102 @@ |
|||||
|
package com.epmet.service.impl; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.commons.tools.utils.ConvertUtils; |
||||
|
import com.epmet.commons.tools.constant.FieldConstant; |
||||
|
import com.epmet.dao.CustomerGridManageUserDao; |
||||
|
import com.epmet.dto.CustomerCommunityManageUserDTO; |
||||
|
import com.epmet.dto.CustomerGridManageUserDTO; |
||||
|
import com.epmet.entity.CustomerCommunityManageUserEntity; |
||||
|
import com.epmet.entity.CustomerGridManageUserEntity; |
||||
|
import com.epmet.redis.CustomerGridManageUserRedis; |
||||
|
import com.epmet.service.CustomerGridManageUserService; |
||||
|
import org.apache.commons.lang3.StringUtils; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
import org.springframework.transaction.annotation.Transactional; |
||||
|
|
||||
|
import java.util.Arrays; |
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* 网格治理人员 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2023-11-27 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class CustomerGridManageUserServiceImpl extends BaseServiceImpl<CustomerGridManageUserDao, CustomerGridManageUserEntity> implements CustomerGridManageUserService { |
||||
|
|
||||
|
@Autowired |
||||
|
private CustomerGridManageUserRedis customerGridManageUserRedis; |
||||
|
|
||||
|
@Override |
||||
|
public PageData<CustomerGridManageUserDTO> page(Map<String, Object> params) { |
||||
|
IPage<CustomerGridManageUserEntity> page = baseDao.selectPage( |
||||
|
getPage(params, FieldConstant.CREATED_TIME, false), |
||||
|
getWrapper(params) |
||||
|
); |
||||
|
return getPageData(page, CustomerGridManageUserDTO.class); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public List<CustomerGridManageUserDTO> list(Map<String, Object> params) { |
||||
|
List<CustomerGridManageUserEntity> entityList = baseDao.selectList(getWrapper(params)); |
||||
|
|
||||
|
return ConvertUtils.sourceToTarget(entityList, CustomerGridManageUserDTO.class); |
||||
|
} |
||||
|
|
||||
|
private QueryWrapper<CustomerGridManageUserEntity> getWrapper(Map<String, Object> params){ |
||||
|
String id = (String)params.get(FieldConstant.ID_HUMP); |
||||
|
|
||||
|
QueryWrapper<CustomerGridManageUserEntity> wrapper = new QueryWrapper<>(); |
||||
|
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
||||
|
|
||||
|
return wrapper; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public CustomerGridManageUserDTO get(String id) { |
||||
|
CustomerGridManageUserEntity entity = baseDao.selectById(id); |
||||
|
return ConvertUtils.sourceToTarget(entity, CustomerGridManageUserDTO.class); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void save(CustomerGridManageUserDTO dto) { |
||||
|
CustomerGridManageUserEntity entity = ConvertUtils.sourceToTarget(dto, CustomerGridManageUserEntity.class); |
||||
|
insert(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void update(CustomerGridManageUserDTO dto) { |
||||
|
CustomerGridManageUserEntity entity = ConvertUtils.sourceToTarget(dto, CustomerGridManageUserEntity.class); |
||||
|
updateById(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void delete(String[] ids) { |
||||
|
// 逻辑删除(@TableLogic 注解)
|
||||
|
baseDao.deleteBatchIds(Arrays.asList(ids)); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public List<CustomerGridManageUserDTO> listForCommnity(String gridId, String type) { |
||||
|
|
||||
|
LambdaQueryWrapper<CustomerGridManageUserEntity> wrapper = new LambdaQueryWrapper<>(); |
||||
|
wrapper.eq(CustomerGridManageUserEntity::getId, gridId) |
||||
|
.eq(CustomerGridManageUserEntity::getType, type); |
||||
|
|
||||
|
List<CustomerGridManageUserEntity> entityList = baseDao.selectList(wrapper); |
||||
|
|
||||
|
return ConvertUtils.sourceToTarget(entityList, CustomerGridManageUserDTO.class); |
||||
|
} |
||||
|
|
||||
|
} |
||||
Loading…
Reference in new issue