27 changed files with 1590 additions and 0 deletions
@ -0,0 +1,100 @@ |
|||||
|
package com.epmet.dto; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.Date; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 附加积分规则 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-06-15 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class PointAdditiveRuleDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 主键 |
||||
|
*/ |
||||
|
private String id; |
||||
|
|
||||
|
/** |
||||
|
* 客户ID |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 记录类型;分类:category;规则:rule |
||||
|
*/ |
||||
|
private String type; |
||||
|
|
||||
|
/** |
||||
|
* 允许申请标记;允许0(type = category时,强制赋值为0),禁止1。 |
||||
|
*/ |
||||
|
private String applyFlag; |
||||
|
|
||||
|
/** |
||||
|
* 积分类别编码;德育积分moral_education;党建积分party_building |
||||
|
*/ |
||||
|
private String categoryCode; |
||||
|
|
||||
|
/** |
||||
|
* 积分类别名称;type=category时必填 |
||||
|
*/ |
||||
|
private String categoryName; |
||||
|
|
||||
|
/** |
||||
|
* 积分规则名称;type=rule时必填 |
||||
|
*/ |
||||
|
private String ruleName; |
||||
|
|
||||
|
/** |
||||
|
* 上级节点ID;上级分类ID,顶级分类的PID为0 |
||||
|
*/ |
||||
|
private String pid; |
||||
|
|
||||
|
/** |
||||
|
* 上级节点ID路径;所有上级节点以英文冒号(:)拼接;不必拼接0 |
||||
|
*/ |
||||
|
private String pids; |
||||
|
|
||||
|
/** |
||||
|
* 分值;正数加分,负数减分;type=rule时必填 |
||||
|
*/ |
||||
|
private Integer pointValue; |
||||
|
|
||||
|
/** |
||||
|
* 删除标识;0.未删除 1.已删除 |
||||
|
*/ |
||||
|
private String delFlag; |
||||
|
|
||||
|
/** |
||||
|
* 乐观锁 |
||||
|
*/ |
||||
|
private Integer revision; |
||||
|
|
||||
|
/** |
||||
|
* 创建人 |
||||
|
*/ |
||||
|
private String createdBy; |
||||
|
|
||||
|
/** |
||||
|
* 创建时间 |
||||
|
*/ |
||||
|
private Date createdTime; |
||||
|
|
||||
|
/** |
||||
|
* 更新人 |
||||
|
*/ |
||||
|
private String updatedBy; |
||||
|
|
||||
|
/** |
||||
|
* 更新时间 |
||||
|
*/ |
||||
|
private Date updatedTime; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,104 @@ |
|||||
|
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 2022-06-15 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class PointRewardDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 主键 |
||||
|
*/ |
||||
|
private String id; |
||||
|
|
||||
|
/** |
||||
|
* 客户ID |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 组织ID |
||||
|
*/ |
||||
|
private String agencyId; |
||||
|
|
||||
|
/** |
||||
|
* 组织ID路径 |
||||
|
*/ |
||||
|
private String agencyPids; |
||||
|
|
||||
|
/** |
||||
|
* 房屋ID |
||||
|
*/ |
||||
|
private String houseId; |
||||
|
|
||||
|
/** |
||||
|
* 房屋名称;完整拼接的名称 |
||||
|
*/ |
||||
|
private String houseAllName; |
||||
|
|
||||
|
/** |
||||
|
* 工作人员ID |
||||
|
*/ |
||||
|
private String staffId; |
||||
|
|
||||
|
/** |
||||
|
* 工作人员姓名 |
||||
|
*/ |
||||
|
private String staffName; |
||||
|
|
||||
|
/** |
||||
|
* 操作类型;积分奖励point_reward;积分扣罚point_fine |
||||
|
*/ |
||||
|
private String businessCode; |
||||
|
|
||||
|
/** |
||||
|
* 备注说明;200字内 |
||||
|
*/ |
||||
|
private String statement; |
||||
|
|
||||
|
/** |
||||
|
* 奖扣总分值 |
||||
|
*/ |
||||
|
private Integer pointValue; |
||||
|
|
||||
|
/** |
||||
|
* 删除标识;0.未删除 1.已删除 |
||||
|
*/ |
||||
|
private String delFlag; |
||||
|
|
||||
|
/** |
||||
|
* 乐观锁 |
||||
|
*/ |
||||
|
private Integer revision; |
||||
|
|
||||
|
/** |
||||
|
* 创建人 |
||||
|
*/ |
||||
|
private String createdBy; |
||||
|
|
||||
|
/** |
||||
|
* 创建时间 |
||||
|
*/ |
||||
|
private Date createdTime; |
||||
|
|
||||
|
/** |
||||
|
* 更新人 |
||||
|
*/ |
||||
|
private String updatedBy; |
||||
|
|
||||
|
/** |
||||
|
* 更新时间 |
||||
|
*/ |
||||
|
private Date updatedTime; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,69 @@ |
|||||
|
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 2022-06-15 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class PointRewardRuleDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 主键 |
||||
|
*/ |
||||
|
private String id; |
||||
|
|
||||
|
/** |
||||
|
* 客户ID |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 奖扣ID |
||||
|
*/ |
||||
|
private String rewardId; |
||||
|
|
||||
|
/** |
||||
|
* 规则ID |
||||
|
*/ |
||||
|
private String ruleId; |
||||
|
|
||||
|
/** |
||||
|
* 删除标识;0.未删除 1.已删除 |
||||
|
*/ |
||||
|
private String delFlag; |
||||
|
|
||||
|
/** |
||||
|
* 乐观锁 |
||||
|
*/ |
||||
|
private Integer revision; |
||||
|
|
||||
|
/** |
||||
|
* 创建人 |
||||
|
*/ |
||||
|
private String createdBy; |
||||
|
|
||||
|
/** |
||||
|
* 创建时间 |
||||
|
*/ |
||||
|
private Date createdTime; |
||||
|
|
||||
|
/** |
||||
|
* 更新人 |
||||
|
*/ |
||||
|
private String updatedBy; |
||||
|
|
||||
|
/** |
||||
|
* 更新时间 |
||||
|
*/ |
||||
|
private Date updatedTime; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,82 @@ |
|||||
|
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.PointAdditiveRuleDTO; |
||||
|
import com.epmet.excel.PointAdditiveRuleExcel; |
||||
|
import com.epmet.service.PointAdditiveRuleService; |
||||
|
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 2022-06-15 |
||||
|
*/ |
||||
|
@RestController |
||||
|
@RequestMapping("pointAdditiveRule") |
||||
|
public class PointAdditiveRuleController { |
||||
|
|
||||
|
@Autowired |
||||
|
private PointAdditiveRuleService pointAdditiveRuleService; |
||||
|
|
||||
|
@RequestMapping("page") |
||||
|
public Result<PageData<PointAdditiveRuleDTO>> page(@RequestParam Map<String, Object> params){ |
||||
|
PageData<PointAdditiveRuleDTO> page = pointAdditiveRuleService.page(params); |
||||
|
return new Result<PageData<PointAdditiveRuleDTO>>().ok(page); |
||||
|
} |
||||
|
|
||||
|
@RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET}) |
||||
|
public Result<PointAdditiveRuleDTO> get(@PathVariable("id") String id){ |
||||
|
PointAdditiveRuleDTO data = pointAdditiveRuleService.get(id); |
||||
|
return new Result<PointAdditiveRuleDTO>().ok(data); |
||||
|
} |
||||
|
|
||||
|
@NoRepeatSubmit |
||||
|
@PostMapping("save") |
||||
|
public Result save(@RequestBody PointAdditiveRuleDTO dto){ |
||||
|
//效验数据
|
||||
|
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
||||
|
pointAdditiveRuleService.save(dto); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@NoRepeatSubmit |
||||
|
@PostMapping("update") |
||||
|
public Result update(@RequestBody PointAdditiveRuleDTO dto){ |
||||
|
//效验数据
|
||||
|
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
||||
|
pointAdditiveRuleService.update(dto); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@PostMapping("delete") |
||||
|
public Result delete(@RequestBody String[] ids){ |
||||
|
//效验数据
|
||||
|
AssertUtils.isArrayEmpty(ids, "id"); |
||||
|
pointAdditiveRuleService.delete(ids); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@GetMapping("export") |
||||
|
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { |
||||
|
List<PointAdditiveRuleDTO> list = pointAdditiveRuleService.list(params); |
||||
|
ExcelUtils.exportExcelToTarget(response, null, list, PointAdditiveRuleExcel.class); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
} |
||||
@ -0,0 +1,82 @@ |
|||||
|
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.PointRewardDTO; |
||||
|
import com.epmet.excel.PointRewardExcel; |
||||
|
import com.epmet.service.PointRewardService; |
||||
|
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 2022-06-15 |
||||
|
*/ |
||||
|
@RestController |
||||
|
@RequestMapping("pointReward") |
||||
|
public class PointRewardController { |
||||
|
|
||||
|
@Autowired |
||||
|
private PointRewardService pointRewardService; |
||||
|
|
||||
|
@RequestMapping("page") |
||||
|
public Result<PageData<PointRewardDTO>> page(@RequestParam Map<String, Object> params){ |
||||
|
PageData<PointRewardDTO> page = pointRewardService.page(params); |
||||
|
return new Result<PageData<PointRewardDTO>>().ok(page); |
||||
|
} |
||||
|
|
||||
|
@RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET}) |
||||
|
public Result<PointRewardDTO> get(@PathVariable("id") String id){ |
||||
|
PointRewardDTO data = pointRewardService.get(id); |
||||
|
return new Result<PointRewardDTO>().ok(data); |
||||
|
} |
||||
|
|
||||
|
@NoRepeatSubmit |
||||
|
@PostMapping("save") |
||||
|
public Result save(@RequestBody PointRewardDTO dto){ |
||||
|
//效验数据
|
||||
|
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
||||
|
pointRewardService.save(dto); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@NoRepeatSubmit |
||||
|
@PostMapping("update") |
||||
|
public Result update(@RequestBody PointRewardDTO dto){ |
||||
|
//效验数据
|
||||
|
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
||||
|
pointRewardService.update(dto); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@PostMapping("delete") |
||||
|
public Result delete(@RequestBody String[] ids){ |
||||
|
//效验数据
|
||||
|
AssertUtils.isArrayEmpty(ids, "id"); |
||||
|
pointRewardService.delete(ids); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@GetMapping("export") |
||||
|
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { |
||||
|
List<PointRewardDTO> list = pointRewardService.list(params); |
||||
|
ExcelUtils.exportExcelToTarget(response, null, list, PointRewardExcel.class); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
} |
||||
@ -0,0 +1,82 @@ |
|||||
|
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.PointRewardRuleDTO; |
||||
|
import com.epmet.excel.PointRewardRuleExcel; |
||||
|
import com.epmet.service.PointRewardRuleService; |
||||
|
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 2022-06-15 |
||||
|
*/ |
||||
|
@RestController |
||||
|
@RequestMapping("pointRewardRule") |
||||
|
public class PointRewardRuleController { |
||||
|
|
||||
|
@Autowired |
||||
|
private PointRewardRuleService pointRewardRuleService; |
||||
|
|
||||
|
@RequestMapping("page") |
||||
|
public Result<PageData<PointRewardRuleDTO>> page(@RequestParam Map<String, Object> params){ |
||||
|
PageData<PointRewardRuleDTO> page = pointRewardRuleService.page(params); |
||||
|
return new Result<PageData<PointRewardRuleDTO>>().ok(page); |
||||
|
} |
||||
|
|
||||
|
@RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET}) |
||||
|
public Result<PointRewardRuleDTO> get(@PathVariable("id") String id){ |
||||
|
PointRewardRuleDTO data = pointRewardRuleService.get(id); |
||||
|
return new Result<PointRewardRuleDTO>().ok(data); |
||||
|
} |
||||
|
|
||||
|
@NoRepeatSubmit |
||||
|
@PostMapping("save") |
||||
|
public Result save(@RequestBody PointRewardRuleDTO dto){ |
||||
|
//效验数据
|
||||
|
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
||||
|
pointRewardRuleService.save(dto); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@NoRepeatSubmit |
||||
|
@PostMapping("update") |
||||
|
public Result update(@RequestBody PointRewardRuleDTO dto){ |
||||
|
//效验数据
|
||||
|
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
||||
|
pointRewardRuleService.update(dto); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@PostMapping("delete") |
||||
|
public Result delete(@RequestBody String[] ids){ |
||||
|
//效验数据
|
||||
|
AssertUtils.isArrayEmpty(ids, "id"); |
||||
|
pointRewardRuleService.delete(ids); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@GetMapping("export") |
||||
|
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { |
||||
|
List<PointRewardRuleDTO> list = pointRewardRuleService.list(params); |
||||
|
ExcelUtils.exportExcelToTarget(response, null, list, PointRewardRuleExcel.class); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
} |
||||
@ -0,0 +1,16 @@ |
|||||
|
package com.epmet.dao; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.dao.BaseDao; |
||||
|
import com.epmet.entity.PointAdditiveRuleEntity; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
|
||||
|
/** |
||||
|
* 附加积分规则 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-06-15 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface PointAdditiveRuleDao extends BaseDao<PointAdditiveRuleEntity> { |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,16 @@ |
|||||
|
package com.epmet.dao; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.dao.BaseDao; |
||||
|
import com.epmet.entity.PointRewardEntity; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
|
||||
|
/** |
||||
|
* 积分奖扣 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-06-15 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface PointRewardDao extends BaseDao<PointRewardEntity> { |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,16 @@ |
|||||
|
package com.epmet.dao; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.dao.BaseDao; |
||||
|
import com.epmet.entity.PointRewardRuleEntity; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
|
||||
|
/** |
||||
|
* 积分奖扣明细 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-06-15 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface PointRewardRuleDao extends BaseDao<PointRewardRuleEntity> { |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,69 @@ |
|||||
|
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 2022-06-15 |
||||
|
*/ |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper=false) |
||||
|
@TableName("point_additive_rule") |
||||
|
public class PointAdditiveRuleEntity extends BaseEpmetEntity { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 客户ID |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 记录类型;分类:category;规则:rule |
||||
|
*/ |
||||
|
private String type; |
||||
|
|
||||
|
/** |
||||
|
* 允许申请标记;允许0(type = category时,强制赋值为0),禁止1。 |
||||
|
*/ |
||||
|
private String applyFlag; |
||||
|
|
||||
|
/** |
||||
|
* 积分类别编码;德育积分moral_education;党建积分party_building |
||||
|
*/ |
||||
|
private String categoryCode; |
||||
|
|
||||
|
/** |
||||
|
* 积分类别名称;type=category时必填 |
||||
|
*/ |
||||
|
private String categoryName; |
||||
|
|
||||
|
/** |
||||
|
* 积分规则名称;type=rule时必填 |
||||
|
*/ |
||||
|
private String ruleName; |
||||
|
|
||||
|
/** |
||||
|
* 上级节点ID;上级分类ID,顶级分类的PID为0 |
||||
|
*/ |
||||
|
private String pid; |
||||
|
|
||||
|
/** |
||||
|
* 上级节点ID路径;所有上级节点以英文冒号(:)拼接;不必拼接0 |
||||
|
*/ |
||||
|
private String pids; |
||||
|
|
||||
|
/** |
||||
|
* 分值;正数加分,负数减分;type=rule时必填 |
||||
|
*/ |
||||
|
private Integer pointValue; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,74 @@ |
|||||
|
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 2022-06-15 |
||||
|
*/ |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper=false) |
||||
|
@TableName("point_reward") |
||||
|
public class PointRewardEntity extends BaseEpmetEntity { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 客户ID |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 组织ID |
||||
|
*/ |
||||
|
private String agencyId; |
||||
|
|
||||
|
/** |
||||
|
* 组织ID路径 |
||||
|
*/ |
||||
|
private String agencyPids; |
||||
|
|
||||
|
/** |
||||
|
* 房屋ID |
||||
|
*/ |
||||
|
private String houseId; |
||||
|
|
||||
|
/** |
||||
|
* 房屋名称;完整拼接的名称 |
||||
|
*/ |
||||
|
private String houseAllName; |
||||
|
|
||||
|
/** |
||||
|
* 工作人员ID |
||||
|
*/ |
||||
|
private String staffId; |
||||
|
|
||||
|
/** |
||||
|
* 工作人员姓名 |
||||
|
*/ |
||||
|
private String staffName; |
||||
|
|
||||
|
/** |
||||
|
* 操作类型;积分奖励point_reward;积分扣罚point_fine |
||||
|
*/ |
||||
|
private String businessCode; |
||||
|
|
||||
|
/** |
||||
|
* 备注说明;200字内 |
||||
|
*/ |
||||
|
private String statement; |
||||
|
|
||||
|
/** |
||||
|
* 奖扣总分值 |
||||
|
*/ |
||||
|
private Integer pointValue; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,39 @@ |
|||||
|
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 2022-06-15 |
||||
|
*/ |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper=false) |
||||
|
@TableName("point_reward_rule") |
||||
|
public class PointRewardRuleEntity extends BaseEpmetEntity { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 客户ID |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 奖扣ID |
||||
|
*/ |
||||
|
private String rewardId; |
||||
|
|
||||
|
/** |
||||
|
* 规则ID |
||||
|
*/ |
||||
|
private String ruleId; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,66 @@ |
|||||
|
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 2022-06-15 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class PointAdditiveRuleExcel { |
||||
|
|
||||
|
@Excel(name = "主键") |
||||
|
private String id; |
||||
|
|
||||
|
@Excel(name = "客户ID") |
||||
|
private String customerId; |
||||
|
|
||||
|
@Excel(name = "记录类型;分类:category;规则:rule") |
||||
|
private String type; |
||||
|
|
||||
|
@Excel(name = "允许申请标记;允许0(type = category时,强制赋值为0),禁止1。") |
||||
|
private String applyFlag; |
||||
|
|
||||
|
@Excel(name = "积分类别编码;德育积分moral_education;党建积分party_building") |
||||
|
private String categoryCode; |
||||
|
|
||||
|
@Excel(name = "积分类别名称;type=category时必填") |
||||
|
private String categoryName; |
||||
|
|
||||
|
@Excel(name = "积分规则名称;type=rule时必填") |
||||
|
private String ruleName; |
||||
|
|
||||
|
@Excel(name = "上级节点ID;上级分类ID,顶级分类的PID为0") |
||||
|
private String pid; |
||||
|
|
||||
|
@Excel(name = "上级节点ID路径;所有上级节点以英文冒号(:)拼接;不必拼接0") |
||||
|
private String pids; |
||||
|
|
||||
|
@Excel(name = "分值;正数加分,负数减分;type=rule时必填") |
||||
|
private Integer pointValue; |
||||
|
|
||||
|
@Excel(name = "删除标识;0.未删除 1.已删除") |
||||
|
private String delFlag; |
||||
|
|
||||
|
@Excel(name = "乐观锁") |
||||
|
private Integer revision; |
||||
|
|
||||
|
@Excel(name = "创建人") |
||||
|
private String createdBy; |
||||
|
|
||||
|
@Excel(name = "创建时间") |
||||
|
private Date createdTime; |
||||
|
|
||||
|
@Excel(name = "更新人") |
||||
|
private String updatedBy; |
||||
|
|
||||
|
@Excel(name = "更新时间") |
||||
|
private Date updatedTime; |
||||
|
|
||||
|
|
||||
|
} |
||||
@ -0,0 +1,69 @@ |
|||||
|
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 2022-06-15 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class PointRewardExcel { |
||||
|
|
||||
|
@Excel(name = "主键") |
||||
|
private String id; |
||||
|
|
||||
|
@Excel(name = "客户ID") |
||||
|
private String customerId; |
||||
|
|
||||
|
@Excel(name = "组织ID") |
||||
|
private String agencyId; |
||||
|
|
||||
|
@Excel(name = "组织ID路径") |
||||
|
private String agencyPids; |
||||
|
|
||||
|
@Excel(name = "房屋ID") |
||||
|
private String houseId; |
||||
|
|
||||
|
@Excel(name = "房屋名称;完整拼接的名称") |
||||
|
private String houseAllName; |
||||
|
|
||||
|
@Excel(name = "工作人员ID") |
||||
|
private String staffId; |
||||
|
|
||||
|
@Excel(name = "工作人员姓名") |
||||
|
private String staffName; |
||||
|
|
||||
|
@Excel(name = "操作类型;积分奖励point_reward;积分扣罚point_fine") |
||||
|
private String businessCode; |
||||
|
|
||||
|
@Excel(name = "备注说明;200字内") |
||||
|
private String statement; |
||||
|
|
||||
|
@Excel(name = "奖扣总分值") |
||||
|
private Integer pointValue; |
||||
|
|
||||
|
@Excel(name = "删除标识;0.未删除 1.已删除") |
||||
|
private String delFlag; |
||||
|
|
||||
|
@Excel(name = "乐观锁") |
||||
|
private Integer revision; |
||||
|
|
||||
|
@Excel(name = "创建人") |
||||
|
private String createdBy; |
||||
|
|
||||
|
@Excel(name = "创建时间") |
||||
|
private Date createdTime; |
||||
|
|
||||
|
@Excel(name = "更新人") |
||||
|
private String updatedBy; |
||||
|
|
||||
|
@Excel(name = "更新时间") |
||||
|
private Date updatedTime; |
||||
|
|
||||
|
|
||||
|
} |
||||
@ -0,0 +1,48 @@ |
|||||
|
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 2022-06-15 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class PointRewardRuleExcel { |
||||
|
|
||||
|
@Excel(name = "主键") |
||||
|
private String id; |
||||
|
|
||||
|
@Excel(name = "客户ID") |
||||
|
private String customerId; |
||||
|
|
||||
|
@Excel(name = "奖扣ID") |
||||
|
private String rewardId; |
||||
|
|
||||
|
@Excel(name = "规则ID") |
||||
|
private String ruleId; |
||||
|
|
||||
|
@Excel(name = "删除标识;0.未删除 1.已删除") |
||||
|
private String delFlag; |
||||
|
|
||||
|
@Excel(name = "乐观锁") |
||||
|
private Integer revision; |
||||
|
|
||||
|
@Excel(name = "创建人") |
||||
|
private String createdBy; |
||||
|
|
||||
|
@Excel(name = "创建时间") |
||||
|
private Date createdTime; |
||||
|
|
||||
|
@Excel(name = "更新人") |
||||
|
private String updatedBy; |
||||
|
|
||||
|
@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 2022-06-15 |
||||
|
*/ |
||||
|
@Component |
||||
|
public class PointAdditiveRuleRedis { |
||||
|
@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 2022-06-15 |
||||
|
*/ |
||||
|
@Component |
||||
|
public class PointRewardRedis { |
||||
|
@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 2022-06-15 |
||||
|
*/ |
||||
|
@Component |
||||
|
public class PointRewardRuleRedis { |
||||
|
@Autowired |
||||
|
private RedisUtils redisUtils; |
||||
|
|
||||
|
public void delete(Object[] ids) { |
||||
|
|
||||
|
} |
||||
|
|
||||
|
public void set(){ |
||||
|
|
||||
|
} |
||||
|
|
||||
|
public String get(String id){ |
||||
|
return null; |
||||
|
} |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,78 @@ |
|||||
|
package com.epmet.service; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.service.BaseService; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.dto.PointAdditiveRuleDTO; |
||||
|
import com.epmet.entity.PointAdditiveRuleEntity; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* 附加积分规则 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-06-15 |
||||
|
*/ |
||||
|
public interface PointAdditiveRuleService extends BaseService<PointAdditiveRuleEntity> { |
||||
|
|
||||
|
/** |
||||
|
* 默认分页 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return PageData<PointAdditiveRuleDTO> |
||||
|
* @author generator |
||||
|
* @date 2022-06-15 |
||||
|
*/ |
||||
|
PageData<PointAdditiveRuleDTO> page(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 默认查询 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return java.util.List<PointAdditiveRuleDTO> |
||||
|
* @author generator |
||||
|
* @date 2022-06-15 |
||||
|
*/ |
||||
|
List<PointAdditiveRuleDTO> list(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 单条查询 |
||||
|
* |
||||
|
* @param id |
||||
|
* @return PointAdditiveRuleDTO |
||||
|
* @author generator |
||||
|
* @date 2022-06-15 |
||||
|
*/ |
||||
|
PointAdditiveRuleDTO get(String id); |
||||
|
|
||||
|
/** |
||||
|
* 默认保存 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2022-06-15 |
||||
|
*/ |
||||
|
void save(PointAdditiveRuleDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 默认更新 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2022-06-15 |
||||
|
*/ |
||||
|
void update(PointAdditiveRuleDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 批量删除 |
||||
|
* |
||||
|
* @param ids |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2022-06-15 |
||||
|
*/ |
||||
|
void delete(String[] ids); |
||||
|
} |
||||
@ -0,0 +1,78 @@ |
|||||
|
package com.epmet.service; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.service.BaseService; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.dto.PointRewardRuleDTO; |
||||
|
import com.epmet.entity.PointRewardRuleEntity; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* 积分奖扣明细 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-06-15 |
||||
|
*/ |
||||
|
public interface PointRewardRuleService extends BaseService<PointRewardRuleEntity> { |
||||
|
|
||||
|
/** |
||||
|
* 默认分页 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return PageData<PointRewardRuleDTO> |
||||
|
* @author generator |
||||
|
* @date 2022-06-15 |
||||
|
*/ |
||||
|
PageData<PointRewardRuleDTO> page(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 默认查询 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return java.util.List<PointRewardRuleDTO> |
||||
|
* @author generator |
||||
|
* @date 2022-06-15 |
||||
|
*/ |
||||
|
List<PointRewardRuleDTO> list(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 单条查询 |
||||
|
* |
||||
|
* @param id |
||||
|
* @return PointRewardRuleDTO |
||||
|
* @author generator |
||||
|
* @date 2022-06-15 |
||||
|
*/ |
||||
|
PointRewardRuleDTO get(String id); |
||||
|
|
||||
|
/** |
||||
|
* 默认保存 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2022-06-15 |
||||
|
*/ |
||||
|
void save(PointRewardRuleDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 默认更新 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2022-06-15 |
||||
|
*/ |
||||
|
void update(PointRewardRuleDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 批量删除 |
||||
|
* |
||||
|
* @param ids |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2022-06-15 |
||||
|
*/ |
||||
|
void delete(String[] ids); |
||||
|
} |
||||
@ -0,0 +1,78 @@ |
|||||
|
package com.epmet.service; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.service.BaseService; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.dto.PointRewardDTO; |
||||
|
import com.epmet.entity.PointRewardEntity; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* 积分奖扣 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-06-15 |
||||
|
*/ |
||||
|
public interface PointRewardService extends BaseService<PointRewardEntity> { |
||||
|
|
||||
|
/** |
||||
|
* 默认分页 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return PageData<PointRewardDTO> |
||||
|
* @author generator |
||||
|
* @date 2022-06-15 |
||||
|
*/ |
||||
|
PageData<PointRewardDTO> page(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 默认查询 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return java.util.List<PointRewardDTO> |
||||
|
* @author generator |
||||
|
* @date 2022-06-15 |
||||
|
*/ |
||||
|
List<PointRewardDTO> list(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 单条查询 |
||||
|
* |
||||
|
* @param id |
||||
|
* @return PointRewardDTO |
||||
|
* @author generator |
||||
|
* @date 2022-06-15 |
||||
|
*/ |
||||
|
PointRewardDTO get(String id); |
||||
|
|
||||
|
/** |
||||
|
* 默认保存 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2022-06-15 |
||||
|
*/ |
||||
|
void save(PointRewardDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 默认更新 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2022-06-15 |
||||
|
*/ |
||||
|
void update(PointRewardDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 批量删除 |
||||
|
* |
||||
|
* @param ids |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2022-06-15 |
||||
|
*/ |
||||
|
void delete(String[] ids); |
||||
|
} |
||||
@ -0,0 +1,87 @@ |
|||||
|
package com.epmet.service.impl; |
||||
|
|
||||
|
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.PointAdditiveRuleDao; |
||||
|
import com.epmet.dto.PointAdditiveRuleDTO; |
||||
|
import com.epmet.entity.PointAdditiveRuleEntity; |
||||
|
import com.epmet.redis.PointAdditiveRuleRedis; |
||||
|
import com.epmet.service.PointAdditiveRuleService; |
||||
|
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 2022-06-15 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class PointAdditiveRuleServiceImpl extends BaseServiceImpl<PointAdditiveRuleDao, PointAdditiveRuleEntity> implements PointAdditiveRuleService { |
||||
|
|
||||
|
@Autowired |
||||
|
private PointAdditiveRuleRedis pointAdditiveRuleRedis; |
||||
|
|
||||
|
@Override |
||||
|
public PageData<PointAdditiveRuleDTO> page(Map<String, Object> params) { |
||||
|
IPage<PointAdditiveRuleEntity> page = baseDao.selectPage( |
||||
|
getPage(params, FieldConstant.CREATED_TIME, false), |
||||
|
getWrapper(params) |
||||
|
); |
||||
|
return getPageData(page, PointAdditiveRuleDTO.class); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public List<PointAdditiveRuleDTO> list(Map<String, Object> params) { |
||||
|
List<PointAdditiveRuleEntity> entityList = baseDao.selectList(getWrapper(params)); |
||||
|
|
||||
|
return ConvertUtils.sourceToTarget(entityList, PointAdditiveRuleDTO.class); |
||||
|
} |
||||
|
|
||||
|
private QueryWrapper<PointAdditiveRuleEntity> getWrapper(Map<String, Object> params){ |
||||
|
String id = (String)params.get(FieldConstant.ID_HUMP); |
||||
|
|
||||
|
QueryWrapper<PointAdditiveRuleEntity> wrapper = new QueryWrapper<>(); |
||||
|
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
||||
|
|
||||
|
return wrapper; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public PointAdditiveRuleDTO get(String id) { |
||||
|
PointAdditiveRuleEntity entity = baseDao.selectById(id); |
||||
|
return ConvertUtils.sourceToTarget(entity, PointAdditiveRuleDTO.class); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void save(PointAdditiveRuleDTO dto) { |
||||
|
PointAdditiveRuleEntity entity = ConvertUtils.sourceToTarget(dto, PointAdditiveRuleEntity.class); |
||||
|
insert(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void update(PointAdditiveRuleDTO dto) { |
||||
|
PointAdditiveRuleEntity entity = ConvertUtils.sourceToTarget(dto, PointAdditiveRuleEntity.class); |
||||
|
updateById(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void delete(String[] ids) { |
||||
|
// 逻辑删除(@TableLogic 注解)
|
||||
|
baseDao.deleteBatchIds(Arrays.asList(ids)); |
||||
|
} |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,87 @@ |
|||||
|
package com.epmet.service.impl; |
||||
|
|
||||
|
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.PointRewardRuleDao; |
||||
|
import com.epmet.dto.PointRewardRuleDTO; |
||||
|
import com.epmet.entity.PointRewardRuleEntity; |
||||
|
import com.epmet.redis.PointRewardRuleRedis; |
||||
|
import com.epmet.service.PointRewardRuleService; |
||||
|
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 2022-06-15 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class PointRewardRuleServiceImpl extends BaseServiceImpl<PointRewardRuleDao, PointRewardRuleEntity> implements PointRewardRuleService { |
||||
|
|
||||
|
@Autowired |
||||
|
private PointRewardRuleRedis pointRewardRuleRedis; |
||||
|
|
||||
|
@Override |
||||
|
public PageData<PointRewardRuleDTO> page(Map<String, Object> params) { |
||||
|
IPage<PointRewardRuleEntity> page = baseDao.selectPage( |
||||
|
getPage(params, FieldConstant.CREATED_TIME, false), |
||||
|
getWrapper(params) |
||||
|
); |
||||
|
return getPageData(page, PointRewardRuleDTO.class); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public List<PointRewardRuleDTO> list(Map<String, Object> params) { |
||||
|
List<PointRewardRuleEntity> entityList = baseDao.selectList(getWrapper(params)); |
||||
|
|
||||
|
return ConvertUtils.sourceToTarget(entityList, PointRewardRuleDTO.class); |
||||
|
} |
||||
|
|
||||
|
private QueryWrapper<PointRewardRuleEntity> getWrapper(Map<String, Object> params){ |
||||
|
String id = (String)params.get(FieldConstant.ID_HUMP); |
||||
|
|
||||
|
QueryWrapper<PointRewardRuleEntity> wrapper = new QueryWrapper<>(); |
||||
|
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
||||
|
|
||||
|
return wrapper; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public PointRewardRuleDTO get(String id) { |
||||
|
PointRewardRuleEntity entity = baseDao.selectById(id); |
||||
|
return ConvertUtils.sourceToTarget(entity, PointRewardRuleDTO.class); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void save(PointRewardRuleDTO dto) { |
||||
|
PointRewardRuleEntity entity = ConvertUtils.sourceToTarget(dto, PointRewardRuleEntity.class); |
||||
|
insert(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void update(PointRewardRuleDTO dto) { |
||||
|
PointRewardRuleEntity entity = ConvertUtils.sourceToTarget(dto, PointRewardRuleEntity.class); |
||||
|
updateById(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void delete(String[] ids) { |
||||
|
// 逻辑删除(@TableLogic 注解)
|
||||
|
baseDao.deleteBatchIds(Arrays.asList(ids)); |
||||
|
} |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,87 @@ |
|||||
|
package com.epmet.service.impl; |
||||
|
|
||||
|
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.PointRewardDao; |
||||
|
import com.epmet.dto.PointRewardDTO; |
||||
|
import com.epmet.entity.PointRewardEntity; |
||||
|
import com.epmet.redis.PointRewardRedis; |
||||
|
import com.epmet.service.PointRewardService; |
||||
|
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 2022-06-15 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class PointRewardServiceImpl extends BaseServiceImpl<PointRewardDao, PointRewardEntity> implements PointRewardService { |
||||
|
|
||||
|
@Autowired |
||||
|
private PointRewardRedis pointRewardRedis; |
||||
|
|
||||
|
@Override |
||||
|
public PageData<PointRewardDTO> page(Map<String, Object> params) { |
||||
|
IPage<PointRewardEntity> page = baseDao.selectPage( |
||||
|
getPage(params, FieldConstant.CREATED_TIME, false), |
||||
|
getWrapper(params) |
||||
|
); |
||||
|
return getPageData(page, PointRewardDTO.class); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public List<PointRewardDTO> list(Map<String, Object> params) { |
||||
|
List<PointRewardEntity> entityList = baseDao.selectList(getWrapper(params)); |
||||
|
|
||||
|
return ConvertUtils.sourceToTarget(entityList, PointRewardDTO.class); |
||||
|
} |
||||
|
|
||||
|
private QueryWrapper<PointRewardEntity> getWrapper(Map<String, Object> params){ |
||||
|
String id = (String)params.get(FieldConstant.ID_HUMP); |
||||
|
|
||||
|
QueryWrapper<PointRewardEntity> wrapper = new QueryWrapper<>(); |
||||
|
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
||||
|
|
||||
|
return wrapper; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public PointRewardDTO get(String id) { |
||||
|
PointRewardEntity entity = baseDao.selectById(id); |
||||
|
return ConvertUtils.sourceToTarget(entity, PointRewardDTO.class); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void save(PointRewardDTO dto) { |
||||
|
PointRewardEntity entity = ConvertUtils.sourceToTarget(dto, PointRewardEntity.class); |
||||
|
insert(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void update(PointRewardDTO dto) { |
||||
|
PointRewardEntity entity = ConvertUtils.sourceToTarget(dto, PointRewardEntity.class); |
||||
|
updateById(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void delete(String[] ids) { |
||||
|
// 逻辑删除(@TableLogic 注解)
|
||||
|
baseDao.deleteBatchIds(Arrays.asList(ids)); |
||||
|
} |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,26 @@ |
|||||
|
<?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="com.epmet.dao.PointAdditiveRuleDao"> |
||||
|
|
||||
|
<resultMap type="com.epmet.entity.PointAdditiveRuleEntity" id="pointAdditiveRuleMap"> |
||||
|
<result property="id" column="ID"/> |
||||
|
<result property="customerId" column="CUSTOMER_ID"/> |
||||
|
<result property="type" column="TYPE"/> |
||||
|
<result property="applyFlag" column="APPLY_FLAG"/> |
||||
|
<result property="categoryCode" column="CATEGORY_CODE"/> |
||||
|
<result property="categoryName" column="CATEGORY_NAME"/> |
||||
|
<result property="ruleName" column="RULE_NAME"/> |
||||
|
<result property="pid" column="PID"/> |
||||
|
<result property="pids" column="PIDS"/> |
||||
|
<result property="pointValue" column="POINT_VALUE"/> |
||||
|
<result property="delFlag" column="DEL_FLAG"/> |
||||
|
<result property="revision" column="REVISION"/> |
||||
|
<result property="createdBy" column="CREATED_BY"/> |
||||
|
<result property="createdTime" column="CREATED_TIME"/> |
||||
|
<result property="updatedBy" column="UPDATED_BY"/> |
||||
|
<result property="updatedTime" column="UPDATED_TIME"/> |
||||
|
</resultMap> |
||||
|
|
||||
|
|
||||
|
</mapper> |
||||
@ -0,0 +1,27 @@ |
|||||
|
<?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="com.epmet.dao.PointRewardDao"> |
||||
|
|
||||
|
<resultMap type="com.epmet.entity.PointRewardEntity" id="pointRewardMap"> |
||||
|
<result property="id" column="ID"/> |
||||
|
<result property="customerId" column="CUSTOMER_ID"/> |
||||
|
<result property="agencyId" column="AGENCY_ID"/> |
||||
|
<result property="agencyPids" column="AGENCY_PIDS"/> |
||||
|
<result property="houseId" column="HOUSE_ID"/> |
||||
|
<result property="houseAllName" column="HOUSE_ALL_NAME"/> |
||||
|
<result property="staffId" column="STAFF_ID"/> |
||||
|
<result property="staffName" column="STAFF_NAME"/> |
||||
|
<result property="businessCode" column="BUSINESS_CODE"/> |
||||
|
<result property="statement" column="STATEMENT"/> |
||||
|
<result property="pointValue" column="POINT_VALUE"/> |
||||
|
<result property="delFlag" column="DEL_FLAG"/> |
||||
|
<result property="revision" column="REVISION"/> |
||||
|
<result property="createdBy" column="CREATED_BY"/> |
||||
|
<result property="createdTime" column="CREATED_TIME"/> |
||||
|
<result property="updatedBy" column="UPDATED_BY"/> |
||||
|
<result property="updatedTime" column="UPDATED_TIME"/> |
||||
|
</resultMap> |
||||
|
|
||||
|
|
||||
|
</mapper> |
||||
@ -0,0 +1,20 @@ |
|||||
|
<?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="com.epmet.dao.PointRewardRuleDao"> |
||||
|
|
||||
|
<resultMap type="com.epmet.entity.PointRewardRuleEntity" id="pointRewardRuleMap"> |
||||
|
<result property="id" column="ID"/> |
||||
|
<result property="customerId" column="CUSTOMER_ID"/> |
||||
|
<result property="rewardId" column="REWARD_ID"/> |
||||
|
<result property="ruleId" column="RULE_ID"/> |
||||
|
<result property="delFlag" column="DEL_FLAG"/> |
||||
|
<result property="revision" column="REVISION"/> |
||||
|
<result property="createdBy" column="CREATED_BY"/> |
||||
|
<result property="createdTime" column="CREATED_TIME"/> |
||||
|
<result property="updatedBy" column="UPDATED_BY"/> |
||||
|
<result property="updatedTime" column="UPDATED_TIME"/> |
||||
|
</resultMap> |
||||
|
|
||||
|
|
||||
|
</mapper> |
||||
Loading…
Reference in new issue