1.常规配置-基本配置
2.分类-修改分类名称批量修改商品名称
| | |
| | | .antMatchers("/api/v2/coupon/home/alert").permitAll() |
| | | .antMatchers("/api/customer/partner/name").permitAll() |
| | | .antMatchers("/api/v2/coupon/app/home/alert").permitAll() |
| | | .antMatchers("/v2/config-param/base/info").permitAll() |
| | | .antMatchers("/api/**").authenticated();//配置访问控制,必须认证过后才可以访问 |
| | | |
| | | } |
对比新文件 |
| | |
| | | package com.mzl.flower.dto.request.configParam; |
| | | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class CreateConfigParamDTO { |
| | | |
| | | private Integer paramGroupId; |
| | | private String paramGroup; |
| | | private String paramGroupName; |
| | | private String paramName; |
| | | private String paramKey; |
| | | private String paramValue; |
| | | private String paramPlaceholder; |
| | | private String paramTip; |
| | | private Integer paramOrder; |
| | | private Integer paramValueType; |
| | | private String paramDict; |
| | | } |
对比新文件 |
| | |
| | | package com.mzl.flower.dto.request.configParam; |
| | | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class CreateConfigParamGroupDTO { |
| | | |
| | | private String paramGroup; |
| | | |
| | | private String paramGroupName; |
| | | |
| | | private Integer paramOrder; |
| | | |
| | | } |
对比新文件 |
| | |
| | | package com.mzl.flower.dto.request.configParam; |
| | | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class QueryConfigParamDTO { |
| | | |
| | | private Integer paramGroupId; |
| | | private String paramGroup; |
| | | private String paramGroupName; |
| | | private String paramName; |
| | | private String paramKey; |
| | | private String paramValue; |
| | | private String paramPlaceholder; |
| | | private String paramTip; |
| | | private Integer paramOrder; |
| | | private Integer paramValueType; |
| | | private String paramDict; |
| | | } |
对比新文件 |
| | |
| | | package com.mzl.flower.dto.request.configParam; |
| | | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class QueryConfigParamGroupDTO { |
| | | |
| | | private String paramGroup; |
| | | |
| | | private String paramGroupName; |
| | | |
| | | private Integer paramOrder; |
| | | |
| | | } |
对比新文件 |
| | |
| | | package com.mzl.flower.dto.request.configParam; |
| | | |
| | | import com.mzl.flower.entity.configParam.ConfigParamDO; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import javax.validation.constraints.NotNull; |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class UpdateConfigParamDTO { |
| | | |
| | | @ApiModelProperty("参数列表不能为空") |
| | | @NotNull(message = "参数列表不能为空") |
| | | private List<ConfigParamDO> paramList; |
| | | |
| | | } |
对比新文件 |
| | |
| | | package com.mzl.flower.dto.response.configParam; |
| | | |
| | | public class ConfigParamGroupVO { |
| | | } |
对比新文件 |
| | |
| | | package com.mzl.flower.dto.response.configParam; |
| | | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class ConfigParamVO { |
| | | } |
对比新文件 |
| | |
| | | package com.mzl.flower.entity.configParam; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.mzl.flower.base.BaseAutoEntity; |
| | | import com.mzl.flower.base.BaseEntity; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | /** |
| | | * @author @TaoJie |
| | | * @since 2024-12-02 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = true) |
| | | @Accessors(chain = true) |
| | | @TableName("t_config_param") |
| | | public class ConfigParamDO extends BaseAutoEntity { |
| | | |
| | | |
| | | /** |
| | | * 变量分组id |
| | | */ |
| | | private Integer paramGroupId; |
| | | |
| | | /** |
| | | * 变量分组 |
| | | */ |
| | | private String paramGroup; |
| | | |
| | | /** |
| | | * 变量分组名 |
| | | */ |
| | | private String paramGroupName; |
| | | |
| | | /** |
| | | * 变量名 |
| | | */ |
| | | private String paramName; |
| | | |
| | | /** |
| | | * 变量键 |
| | | */ |
| | | private String paramKey; |
| | | |
| | | /** |
| | | * 变量值 |
| | | */ |
| | | private String paramValue; |
| | | |
| | | /** |
| | | * 变量规则 |
| | | */ |
| | | private String paramPlaceholder; |
| | | |
| | | /** |
| | | * 变量提示 |
| | | */ |
| | | private String paramTip; |
| | | |
| | | /** |
| | | * 变量排序号 |
| | | */ |
| | | private Integer paramOrder; |
| | | |
| | | /** |
| | | * 0 单值 1 多选 2数组JSON |
| | | */ |
| | | private Integer paramValueType; |
| | | |
| | | /** |
| | | * 变量字典 |
| | | */ |
| | | private String paramDict; |
| | | |
| | | /** |
| | | * 控件类型 |
| | | */ |
| | | private String paramControlType; |
| | | |
| | | /** |
| | | * 是否是必填项目 |
| | | */ |
| | | private Integer paramRequire; |
| | | |
| | | /** |
| | | * 参数个数限制数量 |
| | | */ |
| | | private Integer paramLimit; |
| | | |
| | | |
| | | } |
对比新文件 |
| | |
| | | package com.mzl.flower.entity.configParam; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.mzl.flower.base.BaseAutoEntity; |
| | | import com.mzl.flower.base.BaseEntity; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | /** |
| | | * @author @TaoJie |
| | | * @since 2024-12-02 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = true) |
| | | @Accessors(chain = true) |
| | | @TableName("t_config_param_group") |
| | | public class ConfigParamGroupDO extends BaseAutoEntity { |
| | | |
| | | |
| | | /** |
| | | * 变量分组 |
| | | */ |
| | | private String paramGroup; |
| | | |
| | | /** |
| | | * 变量分组名 |
| | | */ |
| | | private String paramGroupName; |
| | | |
| | | /** |
| | | * 变量排序号 |
| | | */ |
| | | private Integer paramOrder; |
| | | |
| | | |
| | | } |
对比新文件 |
| | |
| | | package com.mzl.flower.enums; |
| | | |
| | | import lombok.Getter; |
| | | |
| | | public enum ConfigParamEnum { |
| | | |
| | | BASE("base","基本配置"), |
| | | |
| | | ; |
| | | |
| | | @Getter |
| | | private String name; |
| | | |
| | | private String desc; |
| | | private ConfigParamEnum(String name, String desc){ |
| | | this.name=name; |
| | | this.desc=desc; |
| | | } |
| | | |
| | | } |
对比新文件 |
| | |
| | | package com.mzl.flower.mapper.configParam; |
| | | |
| | | import com.mzl.flower.entity.configParam.ConfigParamGroupDO; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | |
| | | /** |
| | | * <p> |
| | | * Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author @TaoJie |
| | | * @since 2024-12-02 |
| | | */ |
| | | public interface ConfigParamGroupMapper extends BaseMapper<ConfigParamGroupDO> { |
| | | |
| | | } |
对比新文件 |
| | |
| | | package com.mzl.flower.mapper.configParam; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.mzl.flower.entity.configParam.ConfigParamGroupDO; |
| | | |
| | | /** |
| | | * <p> |
| | | * Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author @TaoJie |
| | | * @since 2024-12-02 |
| | | */ |
| | | public interface ConfigParamGroupMapperCustom extends BaseMapper<ConfigParamGroupDO> { |
| | | |
| | | } |
对比新文件 |
| | |
| | | package com.mzl.flower.mapper.configParam; |
| | | |
| | | import com.mzl.flower.entity.configParam.ConfigParamDO; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | |
| | | /** |
| | | * <p> |
| | | * Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author @TaoJie |
| | | * @since 2024-12-02 |
| | | */ |
| | | public interface ConfigParamMapper extends BaseMapper<ConfigParamDO> { |
| | | |
| | | } |
对比新文件 |
| | |
| | | package com.mzl.flower.mapper.configParam; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.mzl.flower.entity.configParam.ConfigParamDO; |
| | | |
| | | /** |
| | | * <p> |
| | | * Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author @TaoJie |
| | | * @since 2024-12-02 |
| | | */ |
| | | public interface ConfigParamMapperCustom extends BaseMapper<ConfigParamDO> { |
| | | |
| | | } |
对比新文件 |
| | |
| | | package com.mzl.flower.service; |
| | | |
| | | import com.mzl.flower.dto.request.configParam.QueryConfigParamDTO; |
| | | import com.mzl.flower.dto.response.configParam.ConfigParamGroupVO; |
| | | import com.mzl.flower.entity.configParam.ConfigParamGroupDO; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务类 |
| | | * </p> |
| | | * |
| | | * @author @TaoJie |
| | | * @since 2024-12-02 |
| | | */ |
| | | public interface ConfigParamGroupService extends IService<ConfigParamGroupDO> { |
| | | |
| | | List<ConfigParamGroupDO> getList(QueryConfigParamDTO dto); |
| | | |
| | | } |
对比新文件 |
| | |
| | | package com.mzl.flower.service; |
| | | |
| | | import com.mzl.flower.dto.request.configParam.QueryConfigParamDTO; |
| | | import com.mzl.flower.dto.request.configParam.UpdateConfigParamDTO; |
| | | import com.mzl.flower.entity.configParam.ConfigParamDO; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务类 |
| | | * </p> |
| | | * |
| | | * @author @TaoJie |
| | | * @since 2024-12-02 |
| | | */ |
| | | public interface ConfigParamService extends IService<ConfigParamDO> { |
| | | |
| | | List<ConfigParamDO> getList(QueryConfigParamDTO dto); |
| | | |
| | | boolean updateConfigParamBatch(UpdateConfigParamDTO dto); |
| | | |
| | | Map<String,Object> getBaseInfo(); |
| | | } |
对比新文件 |
| | |
| | | package com.mzl.flower.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.mzl.flower.dto.request.configParam.QueryConfigParamDTO; |
| | | import com.mzl.flower.dto.response.configParam.ConfigParamGroupVO; |
| | | import com.mzl.flower.entity.configParam.ConfigParamGroupDO; |
| | | import com.mzl.flower.mapper.configParam.ConfigParamGroupMapper; |
| | | import com.mzl.flower.mapper.configParam.ConfigParamGroupMapperCustom; |
| | | import com.mzl.flower.service.ConfigParamGroupService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author @TaoJie |
| | | * @since 2024-12-02 |
| | | */ |
| | | @Service |
| | | public class ConfigParamGroupServiceImpl extends ServiceImpl<ConfigParamGroupMapper, ConfigParamGroupDO> implements ConfigParamGroupService { |
| | | |
| | | @Autowired |
| | | private ConfigParamGroupMapperCustom configParamGroupMapperCustom; |
| | | |
| | | @Override |
| | | public List<ConfigParamGroupDO> getList(QueryConfigParamDTO dto) { |
| | | QueryWrapper<ConfigParamGroupDO> wrapper = new QueryWrapper<>(); |
| | | wrapper.lambda().eq(ConfigParamGroupDO::getDeleted,false) |
| | | .orderByAsc(ConfigParamGroupDO::getParamOrder); |
| | | return list(wrapper); |
| | | } |
| | | } |
对比新文件 |
| | |
| | | package com.mzl.flower.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.mzl.flower.config.exception.ValidationException; |
| | | import com.mzl.flower.dto.request.configParam.QueryConfigParamDTO; |
| | | import com.mzl.flower.dto.request.configParam.UpdateConfigParamDTO; |
| | | import com.mzl.flower.entity.configParam.ConfigParamDO; |
| | | import com.mzl.flower.enums.ConfigParamEnum; |
| | | import com.mzl.flower.mapper.configParam.ConfigParamMapper; |
| | | import com.mzl.flower.mapper.configParam.ConfigParamMapperCustom; |
| | | import com.mzl.flower.service.ConfigParamService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.apache.commons.collections4.CollectionUtils; |
| | | 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.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author @TaoJie |
| | | * @since 2024-12-02 |
| | | */ |
| | | @Service |
| | | public class ConfigParamServiceImpl extends ServiceImpl<ConfigParamMapper, ConfigParamDO> implements ConfigParamService { |
| | | |
| | | @Autowired |
| | | private ConfigParamMapperCustom configParamMapperCustom; |
| | | |
| | | @Override |
| | | public List<ConfigParamDO> getList(QueryConfigParamDTO dto) { |
| | | QueryWrapper<ConfigParamDO> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.lambda().eq(ConfigParamDO::getDeleted,false) |
| | | .eq(Objects.nonNull(dto.getParamGroupId()),ConfigParamDO::getParamGroupId,dto.getParamGroupId()) |
| | | .eq(StringUtils.isNotBlank(dto.getParamKey()),ConfigParamDO::getParamKey,dto.getParamKey()) |
| | | .eq(StringUtils.isNotBlank(dto.getParamGroup()),ConfigParamDO::getParamGroup,dto.getParamGroup()) |
| | | .eq(StringUtils.isNotBlank(dto.getParamGroupName()),ConfigParamDO::getParamGroupName,dto.getParamGroupName()) |
| | | .eq(StringUtils.isNotBlank(dto.getParamName()),ConfigParamDO::getParamName,dto.getParamName()) |
| | | ; |
| | | return list(queryWrapper); |
| | | } |
| | | |
| | | @Transactional |
| | | @Override |
| | | public boolean updateConfigParamBatch(UpdateConfigParamDTO dto) { |
| | | |
| | | if(CollectionUtils.isNotEmpty(dto.getParamList())){ |
| | | // 遍历循环查找是否存在 |
| | | List<ConfigParamDO> configParamUpdateList = dto.getParamList().stream().map(configParamDO -> { |
| | | final ConfigParamDO configParamForUpdate = configParamMapperCustom.selectById(configParamDO.getId()); |
| | | if (null == configParamForUpdate) { |
| | | throw new ValidationException(String.format("ID:{}不存在!", configParamDO.getId())); |
| | | } |
| | | configParamForUpdate.setParamValue(configParamDO.getParamValue()); |
| | | return configParamForUpdate; |
| | | }).collect(Collectors.toList()); |
| | | |
| | | if(CollectionUtils.isNotEmpty(configParamUpdateList)){ |
| | | return saveOrUpdateBatch(configParamUpdateList); |
| | | } |
| | | |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | @Override |
| | | public Map<String,Object> getBaseInfo() { |
| | | QueryConfigParamDTO dto=new QueryConfigParamDTO(); |
| | | dto.setParamGroup(ConfigParamEnum.BASE.getName()); |
| | | final List<ConfigParamDO> list = getList(dto); |
| | | // 把数据转换成map ,只需要获取list中单个item的paramKey ,paramValue |
| | | Map<String, Object> resultMap=new HashMap<>(); |
| | | list.stream().forEach(item -> { |
| | | resultMap.put(item.getParamKey(),item.getParamValue()); |
| | | }); |
| | | |
| | | return resultMap; |
| | | } |
| | | } |
| | |
| | | |
| | | String[] rowsName = new String[]{"序号","下单日期", "销售额", "花农底价", "平台区间加价", "平台加价", "平台区域加价" |
| | | , "合伙人加价", "合伙人区间加价", "会员折扣","优惠券","降级扣款","缺货扣款","补货扣款","售后扣合伙人款","售后扣花农款", |
| | | "售后扣平台款","总包干费","实际销售扎数","利润","结算状态",}; |
| | | "售后扣平台款","总包干费","总销售扎数","实际销售扎数","利润","结算状态",}; |
| | | List<Object[]> dataList = new ArrayList<>(); |
| | | int sn = 1; |
| | | for (OrderReportResultVO o : list) { |
| | |
| | | objs[a++] = o.getOrderFeeSupplier(); // 售后扣花农款 |
| | | objs[a++] = o.getOrderFeePlatform(); //售后扣平台款 |
| | | objs[a++] = o.getPartnerTotalFeeAmount(); // 总包干费 |
| | | objs[a++] = o.getOrderNum(); // 总销售扎数 |
| | | objs[a++] = o.getRealSaleNum(); // 实际销售扎数 |
| | | objs[a++] = o.getProfitFeeAmount(); //利润 |
| | | objs[a++] = o.getSettleStatus(); // 结算状态 |
对比新文件 |
| | |
| | | package com.mzl.flower.web.v2.configParam; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.mzl.flower.base.BaseController; |
| | | import com.mzl.flower.base.R; |
| | | import com.mzl.flower.base.ReturnDataDTO; |
| | | import com.mzl.flower.dto.request.configParam.CreateConfigParamDTO; |
| | | import com.mzl.flower.dto.request.configParam.QueryConfigParamDTO; |
| | | import com.mzl.flower.dto.request.configParam.UpdateConfigParamDTO; |
| | | import com.mzl.flower.dto.response.configParam.ConfigParamVO; |
| | | import com.mzl.flower.service.ConfigParamService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.validation.constraints.Positive; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author @TaoJie |
| | | * @since 2024-12-02 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/v2/config-param") |
| | | @Api(value = "系统配置-分组-参数值", tags = "系统配置-分组-参数值") |
| | | public class ConfigParamController extends BaseController { |
| | | |
| | | @Autowired |
| | | private ConfigParamService configParamService; |
| | | |
| | | @PostMapping("") |
| | | @ApiOperation(value = "新增", notes = "新增") |
| | | public ResponseEntity<ReturnDataDTO> create(@Validated @RequestBody CreateConfigParamDTO dto) { |
| | | return returnData(R.SUCCESS.getCode(), null); |
| | | } |
| | | |
| | | @PutMapping("/{id}") |
| | | @ApiOperation(value = "修改", notes = "修改") |
| | | public ResponseEntity<ReturnDataDTO> update(@PathVariable Integer id,@Validated @RequestBody UpdateConfigParamDTO dto) { |
| | | return returnData(R.SUCCESS.getCode(), null); |
| | | } |
| | | |
| | | @PutMapping("/update/batch") |
| | | @ApiOperation(value = "批量修改", notes = "批量修改") |
| | | public ResponseEntity<ReturnDataDTO> updateBath(@Validated @RequestBody UpdateConfigParamDTO dto) { |
| | | configParamService.updateConfigParamBatch(dto); |
| | | return returnData(R.SUCCESS.getCode(), null); |
| | | } |
| | | |
| | | @DeleteMapping("/{id}") |
| | | @ApiOperation(value = "删除", notes = "删除") |
| | | public ResponseEntity<ReturnDataDTO> delete(Integer id) { |
| | | return returnData(R.SUCCESS.getCode(), null); |
| | | } |
| | | |
| | | @GetMapping("/{id}") |
| | | @ApiOperation(value = "详情", notes = "详情") |
| | | public ResponseEntity<ReturnDataDTO> get(@PathVariable(value = "id") @Positive(message = "{id.positive}") Integer id) { |
| | | return returnData(R.SUCCESS.getCode(), null); |
| | | } |
| | | |
| | | |
| | | @GetMapping("/page") |
| | | @ApiOperation(value = "查询-分页", notes = "查询-分页") |
| | | public ResponseEntity<ReturnDataDTO<Page<ConfigParamVO>>> page(Page page, QueryConfigParamDTO dto) { |
| | | // 设置只查询活动优惠券的 |
| | | return returnData(R.SUCCESS.getCode(), null); |
| | | } |
| | | |
| | | |
| | | @GetMapping("/list") |
| | | @ApiOperation(value = "查询-列表", notes = "查询-列表") |
| | | public ResponseEntity<ReturnDataDTO<Page<ConfigParamVO>>> list(QueryConfigParamDTO dto) { |
| | | // 设置只查询活动优惠券的 |
| | | return returnData(R.SUCCESS.getCode(), configParamService.getList(dto)); |
| | | } |
| | | |
| | | |
| | | @GetMapping("/base/info") |
| | | @ApiOperation(value = "查询-备案信息", notes = "查询-备案信息" ) |
| | | public ResponseEntity<ReturnDataDTO<Map<String,Object>>> getBaseInfo() { |
| | | // 设置只查询活动优惠券的 |
| | | return returnData(R.SUCCESS.getCode(), configParamService.getBaseInfo()); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
对比新文件 |
| | |
| | | package com.mzl.flower.web.v2.configParam; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.mzl.flower.base.BaseController; |
| | | import com.mzl.flower.base.R; |
| | | import com.mzl.flower.base.ReturnDataDTO; |
| | | import com.mzl.flower.dto.request.configParam.CreateConfigParamGroupDTO; |
| | | import com.mzl.flower.dto.request.configParam.QueryConfigParamDTO; |
| | | import com.mzl.flower.dto.response.configParam.ConfigParamVO; |
| | | import com.mzl.flower.service.ConfigParamGroupService; |
| | | import com.mzl.flower.service.ConfigParamService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.validation.constraints.Positive; |
| | | |
| | | /** |
| | | * @author @TaoJie |
| | | * @since 2024-12-02 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/v2/config-param-group") |
| | | @Api(value = "系统配置-分组", tags = "系统配置-分组") |
| | | public class ConfigParamGroupController extends BaseController { |
| | | |
| | | @Autowired |
| | | private ConfigParamGroupService configParamGroupService; |
| | | |
| | | @PostMapping("") |
| | | @ApiOperation(value = "新增", notes = "新增") |
| | | public ResponseEntity<ReturnDataDTO> create(@Validated @RequestBody CreateConfigParamGroupDTO dto) { |
| | | return returnData(R.SUCCESS.getCode(), null); |
| | | } |
| | | |
| | | @PutMapping("/{id}") |
| | | @ApiOperation(value = "修改", notes = "修改") |
| | | public ResponseEntity<ReturnDataDTO> update(@PathVariable Integer id,@Validated @RequestBody CreateConfigParamGroupDTO dto) { |
| | | return returnData(R.SUCCESS.getCode(), null); |
| | | } |
| | | |
| | | @DeleteMapping("/{id}") |
| | | @ApiOperation(value = "删除", notes = "删除") |
| | | public ResponseEntity<ReturnDataDTO> delete(Integer id) { |
| | | return returnData(R.SUCCESS.getCode(), null); |
| | | } |
| | | |
| | | @GetMapping("/{id}") |
| | | @ApiOperation(value = "详情", notes = "详情") |
| | | public ResponseEntity<ReturnDataDTO> get(@PathVariable(value = "id") @Positive(message = "{id.positive}") Integer id) { |
| | | return returnData(R.SUCCESS.getCode(), null); |
| | | } |
| | | |
| | | |
| | | @GetMapping("/page") |
| | | @ApiOperation(value = "查询-分页", notes = "查询-分页") |
| | | public ResponseEntity<ReturnDataDTO<Page<ConfigParamVO>>> page(Page page, QueryConfigParamDTO dto) { |
| | | |
| | | return returnData(R.SUCCESS.getCode(), null); |
| | | } |
| | | |
| | | |
| | | @GetMapping("/list") |
| | | @ApiOperation(value = "查询-列表", notes = "查询-列表") |
| | | public ResponseEntity<ReturnDataDTO<Page<ConfigParamVO>>> list(QueryConfigParamDTO dto) { |
| | | |
| | | return returnData(R.SUCCESS.getCode(), configParamGroupService.getList(dto)); |
| | | } |
| | | |
| | | } |
对比新文件 |
| | |
| | | <?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.mzl.flower.mapper.configParam.ConfigParamGroupMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.mzl.flower.entity.configParam.ConfigParamGroupDO"> |
| | | <id column="id" property="id" /> |
| | | <result column="deleted" property="deleted" /> |
| | | <result column="create_by" property="createBy" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="update_by" property="updateBy" /> |
| | | <result column="update_time" property="updateTime" /> |
| | | <result column="param_group" property="paramGroup" /> |
| | | <result column="param_group_name" property="paramGroupName" /> |
| | | <result column="param_order" property="paramOrder" /> |
| | | </resultMap> |
| | | |
| | | </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.mzl.flower.mapper.configParam.ConfigParamGroupMapperCustom"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.mzl.flower.entity.configParam.ConfigParamGroupDO"> |
| | | <id column="id" property="id" /> |
| | | <result column="deleted" property="deleted" /> |
| | | <result column="create_by" property="createBy" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="update_by" property="updateBy" /> |
| | | <result column="update_time" property="updateTime" /> |
| | | <result column="param_group" property="paramGroup" /> |
| | | <result column="param_group_name" property="paramGroupName" /> |
| | | <result column="param_order" property="paramOrder" /> |
| | | </resultMap> |
| | | |
| | | </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.mzl.flower.mapper.configParam.ConfigParamMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.mzl.flower.entity.configParam.ConfigParamDO"> |
| | | <id column="id" property="id" /> |
| | | <result column="deleted" property="deleted" /> |
| | | <result column="create_by" property="createBy" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="update_by" property="updateBy" /> |
| | | <result column="update_time" property="updateTime" /> |
| | | <result column="param_group_id" property="paramGroupId" /> |
| | | <result column="param_group" property="paramGroup" /> |
| | | <result column="param_group_name" property="paramGroupName" /> |
| | | <result column="param_name" property="paramName" /> |
| | | <result column="param_key" property="paramKey" /> |
| | | <result column="param_value" property="paramValue" /> |
| | | <result column="param_placeholder" property="paramPlaceholder" /> |
| | | <result column="param_tip" property="paramTip" /> |
| | | <result column="param_order" property="paramOrder" /> |
| | | <result column="param_value_type" property="paramValueType" /> |
| | | <result column="param_dict" property="paramDict" /> |
| | | |
| | | <result column="param_control_type" property="paramControlType" /> |
| | | <result column="param_require" property="paramRequire" /> |
| | | <result column="param_limit" property="paramLimit" /> |
| | | </resultMap> |
| | | |
| | | </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.mzl.flower.mapper.configParam.ConfigParamMapperCustom"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.mzl.flower.entity.configParam.ConfigParamDO"> |
| | | <id column="id" property="id" /> |
| | | <result column="deleted" property="deleted" /> |
| | | <result column="create_by" property="createBy" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="update_by" property="updateBy" /> |
| | | <result column="update_time" property="updateTime" /> |
| | | <result column="param_group_id" property="paramGroupId" /> |
| | | <result column="param_group" property="paramGroup" /> |
| | | <result column="param_group_name" property="paramGroupName" /> |
| | | <result column="param_name" property="paramName" /> |
| | | <result column="param_key" property="paramKey" /> |
| | | <result column="param_value" property="paramValue" /> |
| | | <result column="param_placeholder" property="paramPlaceholder" /> |
| | | <result column="param_tip" property="paramTip" /> |
| | | <result column="param_order" property="paramOrder" /> |
| | | <result column="param_value_type" property="paramValueType" /> |
| | | <result column="param_dict" property="paramDict" /> |
| | | </resultMap> |
| | | |
| | | </mapper> |
| | |
| | | |
| | | <update id="updateFlowerCategoryInfo"> |
| | | update t_flower f, t_flower_category fc |
| | | set f.unit = fc.unit, f.color = fc.color |
| | | set f.unit = fc.unit, f.color = fc.color,f.name=fc.name |
| | | where f.category = fc.id and fc.id = #{category} |
| | | </update> |
| | | <update id="updateBatchTypeRank"> |