| | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.dto.DataReportingPageDto; |
| | | import com.yuanchu.mom.dto.ProductCountDto; |
| | | import com.yuanchu.mom.dto.RegistrantCountDto; |
| | | import com.yuanchu.mom.pojo.DataReporting; |
| | | import com.yuanchu.mom.pojo.FansSubmit; |
| | | import com.yuanchu.mom.service.DataReportingService; |
| | | import com.yuanchu.mom.service.FansSubmitService; |
| | | import com.yuanchu.mom.utils.JackSonUtil; |
| | | import com.yuanchu.mom.vo.Result; |
| | | import io.swagger.annotations.Api; |
| | |
| | | |
| | | private DataReportingService dataReportingService; |
| | | |
| | | private FansSubmitService fansSubmitService; |
| | | |
| | | @ApiOperation(value = "è·åæ°æ®ä¸æ¥å表") |
| | | @PostMapping("/selectDataReportingList") |
| | | public Result selectDataReportingList(@RequestBody Map<String, Object> data) { |
| | |
| | | return Result.success(dataReportingService.updateDataReporting(dataReporting)); |
| | | } |
| | | |
| | | @ApiOperation(value = "è·åé¡¹ç®æ±æ»å表") |
| | | @PostMapping("/selectProductCountDtoPageList") |
| | | public Result selectProductCountDtoPageList(@RequestBody Map<String, Object> data) { |
| | | Page page = JSON.parseObject(JSON.toJSONString(data.get("page")), Page.class); |
| | | ProductCountDto productCountDto = JSON.parseObject(JSON.toJSONString(data.get("entity")), ProductCountDto.class); |
| | | return Result.success(dataReportingService.selectProductCountDtoPageList(page, productCountDto)); |
| | | } |
| | | |
| | | @ApiOperation(value = "è·åç»è®°äººæ±æ»å表") |
| | | @PostMapping("/selectRegistrantCountDtoPageList") |
| | | public Result selectRegistrantCountDtoPageList(@RequestBody Map<String, Object> data) { |
| | | Page page = JSON.parseObject(JSON.toJSONString(data.get("page")), Page.class); |
| | | RegistrantCountDto registrantCountDto = JSON.parseObject(JSON.toJSONString(data.get("entity")), RegistrantCountDto.class); |
| | | return Result.success(dataReportingService.selectRegistrantCountDtoPageList(page, registrantCountDto)); |
| | | } |
| | | |
| | | @ApiOperation(value = "è·åè¿ç²ä¸æ¥å表") |
| | | @PostMapping("/selectFansSubmitList") |
| | | public Result selectFansSubmitList(@RequestBody Map<String, Object> data) { |
| | | Page page = JSON.parseObject(JSON.toJSONString(data.get("page")), Page.class); |
| | | FansSubmit fansSubmit = JSON.parseObject(JSON.toJSONString(data.get("entity")), FansSubmit.class); |
| | | return Result.success(fansSubmitService.selectFansSubmitList(page, fansSubmit)); |
| | | } |
| | | |
| | | @ApiOperation(value = "å é¤è¿ç²ä¸æ¥å表") |
| | | @PostMapping("/delFansSubmit") |
| | | public Result delFansSubmit(Integer id){ |
| | | return Result.success(fansSubmitService.delFansSubmit(id)); |
| | | } |
| | | |
| | | @ApiOperation(value = "ä¿®æ¹è¿ç²ä¸æ¥ä¿¡æ¯") |
| | | @PostMapping("/updateFansSubmit") |
| | | public Result<?> updateFansSubmit(@RequestBody FansSubmit fansSubmit) { |
| | | return Result.success(fansSubmitService.updateFansSubmit(fansSubmit)); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ·»å è¿ç²ä¸æ¥ä¿¡æ¯") |
| | | @PostMapping("/addFansSubmit") |
| | | public Result<?> addFansSubmit(@RequestBody FansSubmit fansSubmit) { |
| | | return Result.success(fansSubmitService.addFansSubmit(fansSubmit)); |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.dto; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.yuanchu.mom.annotation.ValueTableShow; |
| | | import com.yuanchu.mom.common.OrderBy; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDateTime; |
| | | |
| | | @Data |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | public class ProductCountDto extends OrderBy implements Serializable { |
| | | |
| | | @ValueTableShow(1) |
| | | @ApiModelProperty("æ¥æ") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime updateTime; |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime createTime; |
| | | |
| | | @ValueTableShow(2) |
| | | @ApiModelProperty("项ç®") |
| | | private String product; |
| | | |
| | | @ValueTableShow(3) |
| | | @ApiModelProperty("æ¶è´¹") |
| | | private BigDecimal consumption; |
| | | |
| | | @ValueTableShow(4) |
| | | @ApiModelProperty("è¿ç²") |
| | | private Integer fansAdd; |
| | | |
| | | @ValueTableShow(5) |
| | | @ApiModelProperty("å®¢æ·ææ¬") |
| | | private BigDecimal customerCosts; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.dto; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.FieldFill; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.yuanchu.mom.annotation.ValueTableShow; |
| | | import com.yuanchu.mom.common.OrderBy; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | import org.hibernate.validator.constraints.Length; |
| | | |
| | | import javax.validation.constraints.NotNull; |
| | | import javax.validation.constraints.Size; |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDateTime; |
| | | |
| | | @Data |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | public class RegistrantCountDto extends OrderBy implements Serializable { |
| | | |
| | | /** |
| | | * ç»è®°äºº |
| | | */ |
| | | @Size(max= 255,message="ç¼ç é¿åº¦ä¸è½è¶
è¿255") |
| | | @ApiModelProperty("ç»è®°äºº") |
| | | @Length(max= 255,message="ç¼ç é¿åº¦ä¸è½è¶
è¿255") |
| | | @ValueTableShow(3) |
| | | private String registrant; |
| | | /** |
| | | * é¨é¨ |
| | | */ |
| | | @Size(max= 255,message="ç¼ç é¿åº¦ä¸è½è¶
è¿255") |
| | | @ApiModelProperty("é¨é¨") |
| | | @Length(max= 255,message="ç¼ç é¿åº¦ä¸è½è¶
è¿255") |
| | | @ValueTableShow(2) |
| | | private String department; |
| | | /** |
| | | * è´¦æ·å |
| | | */ |
| | | @Size(max= 255,message="ç¼ç é¿åº¦ä¸è½è¶
è¿255") |
| | | @ApiModelProperty("è´¦æ·å") |
| | | @Length(max= 255,message="ç¼ç é¿åº¦ä¸è½è¶
è¿255") |
| | | @ValueTableShow(5) |
| | | private String name; |
| | | /** |
| | | * é¡¹ç® |
| | | */ |
| | | @Size(max= 255,message="ç¼ç é¿åº¦ä¸è½è¶
è¿255") |
| | | @ApiModelProperty("项ç®") |
| | | @Length(max= 255,message="ç¼ç é¿åº¦ä¸è½è¶
è¿255") |
| | | @ValueTableShow(4) |
| | | private String product; |
| | | /** |
| | | * å±ç°é |
| | | */ |
| | | @ApiModelProperty("å±ç°é") |
| | | @ValueTableShow(6) |
| | | private Integer show; |
| | | /** |
| | | * ç¹å»é |
| | | */ |
| | | @ApiModelProperty("ç¹å»é") |
| | | @ValueTableShow(7) |
| | | private Integer click; |
| | | /** |
| | | * è´¦æ·æ¶è´¹ |
| | | */ |
| | | @ApiModelProperty("è´¦æ·æ¶è´¹") |
| | | @ValueTableShow(8) |
| | | private BigDecimal accountConsumption; |
| | | /** |
| | | * 客æ·è¿ç¹æ¶è´¹ |
| | | */ |
| | | @ApiModelProperty("客æ·è¿ç¹æ¶è´¹") |
| | | @ValueTableShow(9) |
| | | private BigDecimal rebateConsumption; |
| | | /** |
| | | * æ¶è´¹ |
| | | */ |
| | | @ApiModelProperty("æ¥å®¢æ·æ¶è´¹") |
| | | @ValueTableShow(10) |
| | | private BigDecimal rebateConsumption2; |
| | | /** |
| | | * æåæ¶è´¹ |
| | | */ |
| | | @ApiModelProperty("æåæ¶è´¹") |
| | | @ValueTableShow(11) |
| | | private BigDecimal discountedConsumption; |
| | | /** |
| | | * è¿ç² |
| | | */ |
| | | @ApiModelProperty("è¿ç²") |
| | | @ValueTableShow(12) |
| | | private Integer fansAdd; |
| | | /** |
| | | * å®é
ææ¬ |
| | | */ |
| | | @ApiModelProperty("å®é
ææ¬") |
| | | @ValueTableShow(13) |
| | | private BigDecimal actualCost; |
| | | /** |
| | | * å®¢æ·ææ¬ |
| | | */ |
| | | @ApiModelProperty("å®¢æ·ææ¬") |
| | | @ValueTableShow(14) |
| | | private BigDecimal customerCosts; |
| | | /** |
| | | * 婿¶¦ |
| | | */ |
| | | @ApiModelProperty("婿¶¦") |
| | | @ValueTableShow(15) |
| | | private BigDecimal profit; |
| | | /** |
| | | * 代çè¿ç¹ |
| | | */ |
| | | @ApiModelProperty("代çè¿ç¹") |
| | | @ValueTableShow(16) |
| | | private BigDecimal agentRebate; |
| | | /** |
| | | * 客æ·è¿ç¹ |
| | | */ |
| | | @ApiModelProperty("客æ·è¿ç¹") |
| | | @ValueTableShow(17) |
| | | private BigDecimal customerRebate; |
| | | /** |
| | | * å¤ç¨å段 |
| | | */ |
| | | @ApiModelProperty("å¤ç¨å段") |
| | | @ValueTableShow(18) |
| | | private BigDecimal remark; |
| | | /** |
| | | * |
| | | */ |
| | | @ApiModelProperty("ç»è®°æ¥æ") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime createTime; |
| | | /** |
| | | * |
| | | */ |
| | | @ApiModelProperty("ç³»ç»æ¥æ") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @ValueTableShow(1) |
| | | private LocalDateTime updateTime; |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.yuanchu.mom.dto.DataReportingPageDto; |
| | | import com.yuanchu.mom.dto.ProductCountDto; |
| | | import com.yuanchu.mom.dto.RegistrantCountDto; |
| | | import com.yuanchu.mom.pojo.DataReporting; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | |
| | |
| | | |
| | | IPage<DataReportingPageDto> selectDataReportingDtoPageList(IPage<DataReportingPageDto> page, QueryWrapper<DataReportingPageDto> ew); |
| | | |
| | | IPage<ProductCountDto> selectProductCountDtoPageList(IPage<ProductCountDto> page, QueryWrapper<ProductCountDto> ew); |
| | | |
| | | IPage<RegistrantCountDto> selectRegistrantCountDtoPageList(IPage<RegistrantCountDto> page, QueryWrapper<RegistrantCountDto> ew); |
| | | |
| | | } |
| | | |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.yuanchu.mom.pojo.FansSubmit; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | |
| | | /** |
| | | * @author Administrator |
| | | * @description é对表ãfans_sumbit(è¿ç²ä¸æ¥)ãçæ°æ®åºæä½Mapper |
| | | * @createDate 2023-12-25 00:36:16 |
| | | * @Entity com.yuanchu.mom.pojo.FansSumbit |
| | | */ |
| | | public interface FansSubmitMapper extends BaseMapper<FansSubmit> { |
| | | |
| | | IPage<FansSubmit> selectFansSubmitPageList(IPage<FansSubmit> page, QueryWrapper<FansSubmit> ew); |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | |
| | | import java.util.Date; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.FieldFill; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.yuanchu.mom.annotation.ValueTableShow; |
| | | import com.yuanchu.mom.common.OrderBy; |
| | |
| | | */ |
| | | @NotNull(message="[]ä¸è½ä¸ºç©º") |
| | | @ApiModelProperty("主é®") |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id; |
| | | /** |
| | | * ç»è®°äºº |
| | |
| | | @Size(max= 255,message="ç¼ç é¿åº¦ä¸è½è¶
è¿255") |
| | | @ApiModelProperty("åå»ºç¨æ·") |
| | | @Length(max= 255,message="ç¼ç é¿åº¦ä¸è½è¶
è¿255") |
| | | private String createUser; |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | /** |
| | | * |
| | | */ |
| | | @Size(max= 255,message="ç¼ç é¿åº¦ä¸è½è¶
è¿255") |
| | | @ApiModelProperty("æ´æ°ç¨æ·") |
| | | @Length(max= 255,message="ç¼ç é¿åº¦ä¸è½è¶
è¿255") |
| | | private String updateUser; |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.util.Date; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.yuanchu.mom.annotation.ValueTableShow; |
| | | import com.yuanchu.mom.common.OrderBy; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | import org.hibernate.validator.constraints.Length; |
| | | |
| | | import javax.validation.constraints.NotNull; |
| | | import javax.validation.constraints.Size; |
| | | |
| | | /** |
| | | * è¿ç²ä¸æ¥ |
| | | * @TableName fans_submit |
| | | */ |
| | | @TableName(value ="fans_submit") |
| | | @Data |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | public class FansSubmit extends OrderBy implements Serializable { |
| | | |
| | | /** |
| | | * ä¸»é® |
| | | */ |
| | | @NotNull(message="[主é®]ä¸è½ä¸ºç©º") |
| | | @ApiModelProperty("主é®") |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id; |
| | | /** |
| | | * å®¢æ· |
| | | */ |
| | | @ValueTableShow(1) |
| | | @Size(max= 255,message="ç¼ç é¿åº¦ä¸è½è¶
è¿255") |
| | | @ApiModelProperty("客æ·") |
| | | @Length(max= 255,message="ç¼ç é¿åº¦ä¸è½è¶
è¿255") |
| | | private String custom; |
| | | /** |
| | | * é¡¹ç® |
| | | */ |
| | | @ValueTableShow(2) |
| | | @Size(max= 255,message="ç¼ç é¿åº¦ä¸è½è¶
è¿255") |
| | | @ApiModelProperty("项ç®") |
| | | @Length(max= 255,message="ç¼ç é¿åº¦ä¸è½è¶
è¿255") |
| | | private String product; |
| | | /** |
| | | * å¾®ä¿¡å· |
| | | */ |
| | | @ValueTableShow(3) |
| | | @Size(max= 255,message="ç¼ç é¿åº¦ä¸è½è¶
è¿255") |
| | | @ApiModelProperty("微信å·") |
| | | @Length(max= 255,message="ç¼ç é¿åº¦ä¸è½è¶
è¿255") |
| | | private String vx; |
| | | /** |
| | | * è¿ç² |
| | | */ |
| | | @ValueTableShow(4) |
| | | @ApiModelProperty("è¿ç²") |
| | | private Integer fansAdd; |
| | | /** |
| | | * å建æ¶é´ |
| | | */ |
| | | @ApiModelProperty("ç»è®°æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @ValueTableShow(6) |
| | | private LocalDateTime createTime; |
| | | /** |
| | | * |
| | | */ |
| | | @ApiModelProperty("æ´æ°æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime updateTime; |
| | | /** |
| | | * |
| | | */ |
| | | @ApiModelProperty("ç»è®°äººid") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @ValueTableShow(5) |
| | | @ApiModelProperty("ç»è®°äºº") |
| | | private String createUserName; |
| | | /** |
| | | * |
| | | */ |
| | | @ApiModelProperty("æ´æ°ç¨æ·") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.yuanchu.mom.dto.DataReportingPageDto; |
| | | import com.yuanchu.mom.dto.ProductCountDto; |
| | | import com.yuanchu.mom.dto.RegistrantCountDto; |
| | | import com.yuanchu.mom.pojo.DataReporting; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | |
| | | |
| | | int updateDataReporting(DataReporting dataReporting); |
| | | |
| | | Map<String, Object> selectProductCountDtoPageList(IPage<ProductCountDto> page, ProductCountDto productCountDto); |
| | | |
| | | Map<String, Object> selectRegistrantCountDtoPageList(IPage<RegistrantCountDto> page, RegistrantCountDto registrantCountDto); |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.yuanchu.mom.dto.DataReportingPageDto; |
| | | import com.yuanchu.mom.pojo.FansSubmit; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author Administrator |
| | | * @description é对表ãfans_sumbit(è¿ç²ä¸æ¥)ãçæ°æ®åºæä½Service |
| | | * @createDate 2023-12-25 00:36:16 |
| | | */ |
| | | public interface FansSubmitService extends IService<FansSubmit> { |
| | | |
| | | Map<String, Object> selectFansSubmitList(IPage<FansSubmit> page, FansSubmit fansSubmit); |
| | | |
| | | int delFansSubmit(Integer id); |
| | | |
| | | int updateFansSubmit(FansSubmit fansSubmit); |
| | | |
| | | int addFansSubmit(FansSubmit fansSubmit); |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.yuanchu.mom.common.PrintChina; |
| | | import com.yuanchu.mom.dto.DataReportingPageDto; |
| | | import com.yuanchu.mom.dto.ProductCountDto; |
| | | import com.yuanchu.mom.dto.RegistrantCountDto; |
| | | import com.yuanchu.mom.pojo.DataReporting; |
| | | import com.yuanchu.mom.service.DataReportingService; |
| | | import com.yuanchu.mom.mapper.DataReportingMapper; |
| | |
| | | System.out.println(dataReporting2); |
| | | return dataReportingMapper.updateById(dataReporting2); |
| | | } |
| | | |
| | | @Override |
| | | public Map<String, Object> selectProductCountDtoPageList(IPage<ProductCountDto> page, ProductCountDto productCountDto) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("head", PrintChina.printChina(ProductCountDto.class)); |
| | | map.put("body", dataReportingMapper.selectProductCountDtoPageList(page, QueryWrappers.queryWrappers(productCountDto))); |
| | | return map; |
| | | } |
| | | |
| | | @Override |
| | | public Map<String, Object> selectRegistrantCountDtoPageList(IPage<RegistrantCountDto> page, RegistrantCountDto registrantCountDto) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("head", PrintChina.printChina(RegistrantCountDto.class)); |
| | | map.put("body", dataReportingMapper.selectRegistrantCountDtoPageList(page, QueryWrappers.queryWrappers(registrantCountDto))); |
| | | return map; |
| | | } |
| | | } |
| | | |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.yuanchu.mom.common.PrintChina; |
| | | import com.yuanchu.mom.dto.DataReportingPageDto; |
| | | import com.yuanchu.mom.pojo.FansSubmit; |
| | | import com.yuanchu.mom.service.FansSubmitService; |
| | | import com.yuanchu.mom.mapper.FansSubmitMapper; |
| | | import com.yuanchu.mom.utils.QueryWrappers; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author Administrator |
| | | * @description é对表ãfans_sumbit(è¿ç²ä¸æ¥)ãçæ°æ®åºæä½Serviceå®ç° |
| | | * @createDate 2023-12-25 00:36:16 |
| | | */ |
| | | @Service |
| | | @AllArgsConstructor |
| | | public class FansSubmitServiceImpl extends ServiceImpl<FansSubmitMapper, FansSubmit> |
| | | implements FansSubmitService { |
| | | |
| | | private FansSubmitMapper fansSubmitMapper; |
| | | |
| | | @Override |
| | | public Map<String, Object> selectFansSubmitList(IPage<FansSubmit> page, FansSubmit fansSubmit) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("head", PrintChina.printChina(FansSubmit.class)); |
| | | map.put("body", fansSubmitMapper.selectFansSubmitPageList(page, QueryWrappers.queryWrappers(fansSubmit))); |
| | | return map; |
| | | } |
| | | |
| | | @Override |
| | | public int delFansSubmit(Integer id) { |
| | | return fansSubmitMapper.deleteById(id); |
| | | } |
| | | |
| | | @Override |
| | | public int updateFansSubmit(FansSubmit fansSubmit) { |
| | | return fansSubmitMapper.updateById(fansSubmit); |
| | | } |
| | | |
| | | @Override |
| | | public int addFansSubmit(FansSubmit fansSubmit) { |
| | | return fansSubmitMapper.insert(fansSubmit); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | |
| | | <result property="updateUser" column="update_user" jdbcType="VARCHAR"/> |
| | | </resultMap> |
| | | |
| | | <sql id="Base_Column_List"> |
| | | id,department,registrant, |
| | | product,channel,name, |
| | | show,click,account_consumption, |
| | | rebate_consumption,consumption,discounted_consumption, |
| | | fans_add,actual_cost,internal_costs, |
| | | customer_costs,profit,agent_rebate, |
| | | customer_rebate,remark,create_time, |
| | | update_time,create_user,update_user |
| | | </sql> |
| | | |
| | | <select id="selectDataReportingDtoPageList" resultType="com.yuanchu.mom.dto.DataReportingPageDto"> |
| | | select * from ( |
| | | select dr.*,u1.name create_user_name,u2.name update_user_name from data_reporting dr |
| | |
| | | ${ew.customSqlSegment} |
| | | </if> |
| | | </select> |
| | | <select id="selectProductCountDtoPageList" resultType="com.yuanchu.mom.dto.ProductCountDto"> |
| | | select * from ( |
| | | select update_time, create_time, product, sum(consumption) consumption, sum(fans_add) fans_add, sum(customer_costs) customer_costs |
| | | from data_reporting |
| | | group by product |
| | | ) a |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </if> |
| | | </select> |
| | | <select id="selectRegistrantCountDtoPageList" resultType="com.yuanchu.mom.dto.RegistrantCountDto"> |
| | | select * from ( |
| | | select id, department, registrant, product, name, sum(`show`) `show`, sum(click) click, sum(account_consumption)account_consumption, sum(rebate_consumption) rebate_consumption,(sum(rebate_consumption)+sum(remark)) rebate_consumption2, sum(discounted_consumption) discounted_consumption, sum(fans_add) fans_add, sum(actual_cost) actual_cost, sum(customer_costs) customer_costs, sum(profit) profit, sum(agent_rebate) agent_rebate, sum(customer_rebate) customer_rebate, sum(remark) remark, create_time, update_time |
| | | from data_reporting |
| | | group by registrant |
| | | ) a |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </if> |
| | | </select> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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.yuanchu.mom.mapper.FansSubmitMapper"> |
| | | |
| | | <resultMap id="BaseResultMap" type="com.yuanchu.mom.pojo.FansSubmit"> |
| | | <id property="id" column="id" jdbcType="INTEGER"/> |
| | | <result property="custom" column="custom" jdbcType="VARCHAR"/> |
| | | <result property="product" column="product" jdbcType="VARCHAR"/> |
| | | <result property="vx" column="vx" jdbcType="VARCHAR"/> |
| | | <result property="fansAdd" column="fans_add" jdbcType="INTEGER"/> |
| | | <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/> |
| | | <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/> |
| | | <result property="createUser" column="create_user" jdbcType="INTEGER"/> |
| | | <result property="updateUser" column="update_user" jdbcType="INTEGER"/> |
| | | </resultMap> |
| | | <select id="selectFansSubmitPageList" resultType="com.yuanchu.mom.pojo.FansSubmit"> |
| | | select * from ( |
| | | select fm.*, u.name create_user_name from fans_submit fm, user u |
| | | where fm.create_user = u.id |
| | | ) a |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </if> |
| | | </select> |
| | | |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.controller; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.pojo.CustomEnum; |
| | | import com.yuanchu.mom.pojo.ProductEnum; |
| | | import com.yuanchu.mom.pojo.Role; |
| | | import com.yuanchu.mom.pojo.User; |
| | | import com.yuanchu.mom.service.CustomEnumService; |
| | | import com.yuanchu.mom.service.ProductEnumService; |
| | | import com.yuanchu.mom.utils.JackSonUtil; |
| | | import com.yuanchu.mom.vo.Result; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.util.DigestUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.Map; |
| | | |
| | | @RequestMapping("/enum") |
| | | @RestController |
| | | @Api(tags = "æä¸¾æ¨¡å") |
| | | @AllArgsConstructor |
| | | public class EnumController { |
| | | |
| | | private CustomEnumService customEnumService; |
| | | |
| | | private ProductEnumService productEnumService; |
| | | |
| | | @ApiOperation(value = "è·å客æ·å表") |
| | | @PostMapping("/selectCustomEnumLists") |
| | | public Result selectCustomEnumLists(@RequestBody Map<String, Object> data) throws Exception { |
| | | Page page = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("page")), Page.class); |
| | | CustomEnum customEnum = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), CustomEnum.class); |
| | | return Result.success(customEnumService.selectCustomEnumList(page, customEnum)); |
| | | } |
| | | |
| | | @ApiOperation(value = "è·å客æ·å表æä¸¾") |
| | | @GetMapping("/selectCustomEnumList") |
| | | public Result selectCustomEnumList(){ |
| | | return Result.success(customEnumService.selectList()); |
| | | } |
| | | |
| | | @ApiOperation(value = "å é¤å®¢æ·å表") |
| | | @PostMapping("/delCustomEnum") |
| | | public Result delRole(Integer id){ |
| | | return Result.success(customEnumService.delCustomEnum(id)); |
| | | } |
| | | |
| | | @ApiOperation(value = "ä¿®æ¹å®¢æ·ä¿¡æ¯") |
| | | @PostMapping("/updateCustomEnum") |
| | | public Result<?> updateUser(@RequestBody CustomEnum customEnum) { |
| | | return Result.success(customEnumService.updateCustomEnum(customEnum)); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ·»å 客æ·ä¿¡æ¯") |
| | | @PostMapping("/addCustomEnum") |
| | | public Result<?> addCustomEnum(@RequestBody CustomEnum customEnum) { |
| | | return Result.success(customEnumService.addCustomEnum(customEnum)); |
| | | } |
| | | |
| | | @ApiOperation(value = "è·å项ç®å表") |
| | | @PostMapping("/selectProductEnumLists") |
| | | public Result selectProductEnumLists(@RequestBody Map<String, Object> data) { |
| | | Page page = JSON.parseObject(JSON.toJSONString(data.get("page")), Page.class); |
| | | ProductEnum productEnum = JSON.parseObject(JSON.toJSONString(data.get("entity")), ProductEnum.class); |
| | | return Result.success(productEnumService.selectProductEnumList(page, productEnum)); |
| | | } |
| | | |
| | | @ApiOperation(value = "è·å项ç®å表æä¸¾") |
| | | @GetMapping("/selectProductEnumList") |
| | | public Result selectProductEnumList(){ |
| | | return Result.success(productEnumService.selectList()); |
| | | } |
| | | |
| | | @ApiOperation(value = "å é¤é¡¹ç®å表") |
| | | @PostMapping("/delProductEnum") |
| | | public Result delProductEnum(Integer id){ |
| | | return Result.success(productEnumService.delProductEnum(id)); |
| | | } |
| | | |
| | | @ApiOperation(value = "ä¿®æ¹é¡¹ç®ä¿¡æ¯") |
| | | @PostMapping("/updateProductEnum") |
| | | public Result<?> updateProductEnum(@RequestBody ProductEnum productEnum) { |
| | | return Result.success(productEnumService.updateProductEnum(productEnum)); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ·»å 项ç®ä¿¡æ¯") |
| | | @PostMapping("/addProductEnum") |
| | | public Result<?> addProductEnum(@RequestBody ProductEnum productEnum) { |
| | | return Result.success(productEnumService.addProductEnum(productEnum)); |
| | | } |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.dto.UserPageDto; |
| | | import com.yuanchu.mom.pojo.CustomEnum; |
| | | import com.yuanchu.mom.pojo.Role; |
| | | import com.yuanchu.mom.pojo.User; |
| | | import com.yuanchu.mom.service.RoleService; |
| | |
| | | public Result delRole(Integer id){ |
| | | return Result.success(roleService.delRole(id)); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ·»å è§è²ä¿¡æ¯") |
| | | @PostMapping("/addRole") |
| | | public Result<?> addRole(@RequestBody Role role) { |
| | | return Result.success(roleService.addRole(role)); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.mapper; |
| | | |
| | | import com.yuanchu.mom.pojo.CustomEnum; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | |
| | | /** |
| | | * @author Administrator |
| | | * @description é对表ãcustom_enumãçæ°æ®åºæä½Mapper |
| | | * @createDate 2023-12-24 14:40:43 |
| | | * @Entity com.yuanchu.mom.pojo.CustomEnum |
| | | */ |
| | | public interface CustomEnumMapper extends BaseMapper<CustomEnum> { |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.mapper; |
| | | |
| | | import com.yuanchu.mom.pojo.ProductEnum; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | |
| | | /** |
| | | * @author Administrator |
| | | * @description é对表ãproduct_enum(é¡¹ç®æä¸¾)ãçæ°æ®åºæä½Mapper |
| | | * @createDate 2023-12-24 15:46:30 |
| | | * @Entity com.yuanchu.mom.pojo.ProductEnum |
| | | */ |
| | | public interface ProductEnumMapper extends BaseMapper<ProductEnum> { |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.pojo; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | import javax.validation.constraints.Size; |
| | | import javax.validation.constraints.NotNull; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | import java.time.LocalDateTime; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.FieldFill; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.yuanchu.mom.annotation.ValueTableShow; |
| | | import com.yuanchu.mom.common.OrderBy; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | import org.hibernate.validator.constraints.Length; |
| | | |
| | | /** |
| | | * |
| | | * @TableName custom_enum |
| | | */ |
| | | @Data |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | public class CustomEnum extends OrderBy implements Serializable { |
| | | |
| | | /** |
| | | * ä¸»é® |
| | | */ |
| | | @NotNull(message="[主é®]ä¸è½ä¸ºç©º") |
| | | @ApiModelProperty("主é®") |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id; |
| | | /** |
| | | * 客æ·åç§° |
| | | */ |
| | | @ValueTableShow(1) |
| | | @Size(max= 255,message="ç¼ç é¿åº¦ä¸è½è¶
è¿255") |
| | | @ApiModelProperty("客æ·åç§°") |
| | | @Length(max= 255,message="ç¼ç é¿åº¦ä¸è½è¶
è¿255") |
| | | private String name; |
| | | /** |
| | | * å
¬å¸ |
| | | */ |
| | | @ValueTableShow(2) |
| | | @Size(max= 255,message="ç¼ç é¿åº¦ä¸è½è¶
è¿255") |
| | | @ApiModelProperty("å
¬å¸") |
| | | @Length(max= 255,message="ç¼ç é¿åº¦ä¸è½è¶
è¿255") |
| | | private String company; |
| | | |
| | | @ValueTableShow(3) |
| | | @ApiModelProperty(value = "åå»ºæ¥æ") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime createTime; |
| | | |
| | | @ValueTableShow(4) |
| | | @ApiModelProperty(value = "æ´æ°æ¥æ") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime updateTime; |
| | | /** |
| | | * |
| | | */ |
| | | @ApiModelProperty("") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | /** |
| | | * |
| | | */ |
| | | @ApiModelProperty("") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.pojo; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | import javax.validation.constraints.Size; |
| | | import javax.validation.constraints.NotNull; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.util.Date; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.FieldFill; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.yuanchu.mom.annotation.ValueTableShow; |
| | | import com.yuanchu.mom.common.OrderBy; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | import org.hibernate.validator.constraints.Length; |
| | | |
| | | /** |
| | | * é¡¹ç®æä¸¾ |
| | | * @TableName product_enum |
| | | */ |
| | | @Data |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | public class ProductEnum extends OrderBy implements Serializable { |
| | | |
| | | /** |
| | | * ä¸»é® |
| | | */ |
| | | @NotNull(message="[主é®]ä¸è½ä¸ºç©º") |
| | | @ApiModelProperty("主é®") |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id; |
| | | /** |
| | | * é¡¹ç® |
| | | */ |
| | | @ValueTableShow(1) |
| | | @Size(max= 255,message="ç¼ç é¿åº¦ä¸è½è¶
è¿255") |
| | | @ApiModelProperty("项ç®") |
| | | @Length(max= 255,message="ç¼ç é¿åº¦ä¸è½è¶
è¿255") |
| | | private String product; |
| | | /** |
| | | * å建æ¶é´ |
| | | */ |
| | | @ValueTableShow(2) |
| | | @ApiModelProperty(value = "åå»ºæ¥æ") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime createTime; |
| | | /** |
| | | * æ´æ°æ¶é´ |
| | | */ |
| | | @ValueTableShow(3) |
| | | @ApiModelProperty("æ´æ°æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime updateTime; |
| | | /** |
| | | * |
| | | */ |
| | | @ApiModelProperty("") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | /** |
| | | * |
| | | */ |
| | | @ApiModelProperty("") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | } |
| | |
| | | package com.yuanchu.mom.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.FieldFill; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.yuanchu.mom.annotation.ValueTableShow; |
| | | import com.yuanchu.mom.common.OrderBy; |
| | |
| | | public class Role extends OrderBy implements Serializable { |
| | | |
| | | @ApiModelProperty(value = "主é®") |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ValueTableShow(1) |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.yuanchu.mom.pojo.CustomEnum; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.yuanchu.mom.pojo.Role; |
| | | import com.yuanchu.mom.pojo.User; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author Administrator |
| | | * @description é对表ãcustom_enumãçæ°æ®åºæä½Service |
| | | * @createDate 2023-12-24 14:40:43 |
| | | */ |
| | | |
| | | |
| | | public interface CustomEnumService { |
| | | |
| | | Map<String, Object> selectCustomEnumList(IPage<CustomEnum> page, CustomEnum customEnum); |
| | | |
| | | List<CustomEnum> selectList(); |
| | | |
| | | int delCustomEnum(Integer id); |
| | | |
| | | int updateCustomEnum(CustomEnum customEnum); |
| | | |
| | | int addCustomEnum(CustomEnum customEnum); |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.yuanchu.mom.pojo.ProductEnum; |
| | | import com.yuanchu.mom.pojo.ProductEnum; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author Administrator |
| | | * @description é对表ãproduct_enum(é¡¹ç®æä¸¾)ãçæ°æ®åºæä½Service |
| | | * @createDate 2023-12-24 15:46:30 |
| | | */ |
| | | public interface ProductEnumService extends IService<ProductEnum> { |
| | | |
| | | Map<String, Object> selectProductEnumList(IPage<ProductEnum> page, ProductEnum productEnum); |
| | | |
| | | List<ProductEnum> selectList(); |
| | | |
| | | int delProductEnum(Integer id); |
| | | |
| | | int updateProductEnum(ProductEnum productEnum); |
| | | |
| | | int addProductEnum(ProductEnum productEnum); |
| | | |
| | | } |
| | |
| | | |
| | | int delRole(Integer id); |
| | | |
| | | int addRole(Role role); |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service.imp; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.yuanchu.mom.common.PrintChina; |
| | | import com.yuanchu.mom.mapper.CustomEnumMapper; |
| | | import com.yuanchu.mom.pojo.CustomEnum; |
| | | import com.yuanchu.mom.pojo.Role; |
| | | import com.yuanchu.mom.service.CustomEnumService; |
| | | import com.yuanchu.mom.utils.QueryWrappers; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @Service |
| | | @AllArgsConstructor |
| | | public class CustomEnumServiceImp implements CustomEnumService { |
| | | |
| | | private CustomEnumMapper customEnumMapper; |
| | | |
| | | @Override |
| | | public Map<String, Object> selectCustomEnumList(IPage<CustomEnum> page, CustomEnum customEnum) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("head", PrintChina.printChina(CustomEnum.class)); |
| | | map.put("body", customEnumMapper.selectPage(page, QueryWrappers.queryWrappers(customEnum))); |
| | | return map; |
| | | } |
| | | |
| | | @Override |
| | | public List<CustomEnum> selectList() { |
| | | return customEnumMapper.selectList(null); |
| | | } |
| | | |
| | | @Override |
| | | public int delCustomEnum(Integer id) { |
| | | return customEnumMapper.deleteById(id); |
| | | } |
| | | |
| | | @Override |
| | | public int updateCustomEnum(CustomEnum customEnum) { |
| | | return customEnumMapper.updateById(customEnum); |
| | | } |
| | | |
| | | @Override |
| | | public int addCustomEnum(CustomEnum customEnum) { |
| | | return customEnumMapper.insert(customEnum); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service.imp; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.yuanchu.mom.common.PrintChina; |
| | | import com.yuanchu.mom.mapper.ProductEnumMapper; |
| | | import com.yuanchu.mom.pojo.ProductEnum; |
| | | import com.yuanchu.mom.pojo.ProductEnum; |
| | | import com.yuanchu.mom.service.ProductEnumService; |
| | | import com.yuanchu.mom.mapper.ProductEnumMapper; |
| | | import com.yuanchu.mom.utils.QueryWrappers; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author Administrator |
| | | * @description é对表ãproduct_enum(é¡¹ç®æä¸¾)ãçæ°æ®åºæä½Serviceå®ç° |
| | | * @createDate 2023-12-24 15:46:30 |
| | | */ |
| | | @Service |
| | | @AllArgsConstructor |
| | | public class ProductEnumServiceImpl extends ServiceImpl<ProductEnumMapper, ProductEnum> |
| | | implements ProductEnumService{ |
| | | |
| | | private ProductEnumMapper productEnumMapper; |
| | | |
| | | @Override |
| | | public Map<String, Object> selectProductEnumList(IPage<ProductEnum> page, ProductEnum productEnum) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("head", PrintChina.printChina(ProductEnum.class)); |
| | | map.put("body", productEnumMapper.selectPage(page, QueryWrappers.queryWrappers(productEnum))); |
| | | return map; |
| | | } |
| | | |
| | | @Override |
| | | public List<ProductEnum> selectList() { |
| | | return productEnumMapper.selectList(null); |
| | | } |
| | | |
| | | @Override |
| | | public int delProductEnum(Integer id) { |
| | | return productEnumMapper.deleteById(id); |
| | | } |
| | | |
| | | @Override |
| | | public int updateProductEnum(ProductEnum productEnum) { |
| | | return productEnumMapper.updateById(productEnum); |
| | | } |
| | | |
| | | @Override |
| | | public int addProductEnum(ProductEnum productEnum) { |
| | | return productEnumMapper.insert(productEnum); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | |
| | | public int delRole(Integer id) { |
| | | return roleMapper.deleteById(id); |
| | | } |
| | | |
| | | @Override |
| | | public int addRole(Role role) { |
| | | return roleMapper.insert(role); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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.yuanchu.mom.mapper.CustomEnumMapper"> |
| | | |
| | | <resultMap id="BaseResultMap" type="com.yuanchu.mom.pojo.CustomEnum"> |
| | | <id property="id" column="id" jdbcType="INTEGER"/> |
| | | <result property="name" column="name" jdbcType="VARCHAR"/> |
| | | <result property="company" column="company" jdbcType="VARCHAR"/> |
| | | <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/> |
| | | <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/> |
| | | <result property="createUser" column="create_user" jdbcType="INTEGER"/> |
| | | <result property="updateUser" column="update_user" jdbcType="INTEGER"/> |
| | | </resultMap> |
| | | |
| | | <sql id="Base_Column_List"> |
| | | id,name,company, |
| | | create_time,update_time,create_user, |
| | | update_user |
| | | </sql> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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.yuanchu.mom.mapper.ProductEnumMapper"> |
| | | |
| | | <resultMap id="BaseResultMap" type="com.yuanchu.mom.pojo.ProductEnum"> |
| | | <id property="id" column="id" jdbcType="INTEGER"/> |
| | | <result property="name" column="name" jdbcType="VARCHAR"/> |
| | | <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/> |
| | | <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/> |
| | | <result property="createUser" column="create_user" jdbcType="INTEGER"/> |
| | | <result property="updateUser" column="update_user" jdbcType="INTEGER"/> |
| | | </resultMap> |
| | | |
| | | <sql id="Base_Column_List"> |
| | | id,name,create_time, |
| | | update_time,create_user,update_user |
| | | </sql> |
| | | </mapper> |