制作物料英文描述
This commit is contained in:
parent
070943ceff
commit
7abe7e7255
|
|
@ -86,4 +86,30 @@ public class MaterialAttrValueI18n21Api extends BaseApi {
|
|||
return ResultVO.success(materialAttrValueI18n21Service.updateDelFlagByRowId(rowId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 禁用
|
||||
*
|
||||
* @param rowId DTO 实体对象
|
||||
* @return 修改结果
|
||||
*/
|
||||
@GetMapping("disable")
|
||||
@ApiOperation("auto-禁用")
|
||||
public ResultVO<Boolean> disable(@RequestParam("rowId") Long rowId) {
|
||||
|
||||
return ResultVO.success(materialAttrValueI18n21Service.disableOrEnable(rowId, 0));
|
||||
}
|
||||
|
||||
/**
|
||||
* 启用
|
||||
*
|
||||
* @param rowId DTO 实体对象
|
||||
* @return 修改结果
|
||||
*/
|
||||
@GetMapping("enable")
|
||||
@ApiOperation("auto-启用")
|
||||
public ResultVO<Boolean> enable(@RequestParam("rowId") Long rowId) {
|
||||
|
||||
return ResultVO.success(materialAttrValueI18n21Service.disableOrEnable(rowId, 1));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
package com.nflg.product.material.pojo.dto;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
|
@ -42,10 +40,11 @@ public class MaterialAttrValueI18n21DTO implements Serializable {
|
|||
private String attrValueEn;
|
||||
|
||||
/**
|
||||
* 删除标记 Y是 N否
|
||||
* 状态 0:不启用1:启用
|
||||
*/
|
||||
@ApiModelProperty(value = "删除标记 Y是 N否")
|
||||
private String delFlag;
|
||||
@ApiModelProperty(value = "状态 0:不启用1:启用")
|
||||
private Integer enableState;
|
||||
|
||||
|
||||
/**
|
||||
* 备注
|
||||
|
|
@ -65,5 +64,17 @@ public class MaterialAttrValueI18n21DTO implements Serializable {
|
|||
@ApiModelProperty(value = "创建时间")
|
||||
private LocalDateTime createdTime;
|
||||
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private String updatedBy;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private LocalDateTime updatedTime;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -51,11 +51,11 @@ public class MaterialAttrValueI18n21Entity implements Serializable {
|
|||
private String attrValueEn;
|
||||
|
||||
/**
|
||||
* 删除标记 Y是 N否
|
||||
* 状态 0:不启用1:启用
|
||||
*/
|
||||
@TableField(value = "del_flag")
|
||||
@ApiModelProperty(value = "删除标记 Y是 N否")
|
||||
private String delFlag;
|
||||
@TableField(value = "enable_state")
|
||||
@ApiModelProperty(value = "状态 0:不启用1:启用")
|
||||
private Integer enableState;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
|
|
@ -78,6 +78,20 @@ public class MaterialAttrValueI18n21Entity implements Serializable {
|
|||
@ApiModelProperty(value = "创建时间")
|
||||
private LocalDateTime createdTime;
|
||||
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
@TableField(value = "updated_by", fill = FieldFill.INSERT_UPDATE)
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private String updatedBy;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@TableField(value = "updated_time", fill = FieldFill.INSERT_UPDATE)
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private LocalDateTime updatedTime;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,10 +39,10 @@ public class MaterialAttrValueI18n21Query implements Serializable {
|
|||
private String attrValueEn;
|
||||
|
||||
/**
|
||||
* 删除标记 Y是 N否
|
||||
* 状态 0:不启用1:启用
|
||||
*/
|
||||
@ApiModelProperty(value = "删除标记 Y是 N否")
|
||||
private String delFlag;
|
||||
@ApiModelProperty(value = "状态 0:不启用1:启用")
|
||||
private Integer enableState;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
|
|
|
|||
|
|
@ -42,10 +42,10 @@ public class MaterialAttrValueI18n21VO implements Serializable {
|
|||
private String attrValueEn;
|
||||
|
||||
/**
|
||||
* 删除标记 Y是 N否
|
||||
* 状态 0:不启用1:启用
|
||||
*/
|
||||
@ApiModelProperty(value = "删除标记 Y是 N否")
|
||||
private String delFlag;
|
||||
@ApiModelProperty(value = "状态 0:不启用1:启用")
|
||||
private Integer enableState;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
|
|
@ -65,6 +65,18 @@ public class MaterialAttrValueI18n21VO implements Serializable {
|
|||
@ApiModelProperty(value = "创建时间")
|
||||
private LocalDateTime createdTime;
|
||||
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private String updatedBy;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private LocalDateTime updatedTime;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ package com.nflg.product.material.service;
|
|||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.nflg.product.base.core.conmon.util.SessionUtil;
|
||||
import com.nflg.product.base.core.exception.NflgBusinessException;
|
||||
import com.nflg.product.base.core.vo.PageVO;
|
||||
import com.nflg.product.material.mapper.master.MaterialAttrValueI18n21Mapper;
|
||||
|
|
@ -17,6 +18,7 @@ import org.springframework.web.bind.annotation.RequestBody;
|
|||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
|
|
@ -93,6 +95,8 @@ public class MaterialAttrValueI18n21Service extends ServiceImpl<MaterialAttrValu
|
|||
//类型转换
|
||||
MaterialAttrValueI18n21Entity entity = new MaterialAttrValueI18n21Entity();
|
||||
BeanUtils.copyProperties(paramDto, entity);
|
||||
entity.setUpdatedBy(SessionUtil.getRealName());
|
||||
entity.setUpdatedTime(LocalDateTime.now());
|
||||
return materialAttrValueI18n21Mapper.updateById(entity) == 1;
|
||||
}
|
||||
|
||||
|
|
@ -104,8 +108,18 @@ public class MaterialAttrValueI18n21Service extends ServiceImpl<MaterialAttrValu
|
|||
public Boolean updateDelFlagByRowId(Long rowId) {
|
||||
MaterialAttrValueI18n21Entity updateEntity = new MaterialAttrValueI18n21Entity();
|
||||
updateEntity.setRowId(rowId);
|
||||
updateEntity.setDelFlag("Y");
|
||||
updateEntity.setEnableState(0);
|
||||
updateEntity.setUpdatedBy(SessionUtil.getRealName());
|
||||
updateEntity.setUpdatedTime(LocalDateTime.now());
|
||||
return materialAttrValueI18n21Mapper.updateById(updateEntity) == 1;
|
||||
}
|
||||
|
||||
public Boolean disableOrEnable(Long rowId, Integer state) {
|
||||
MaterialAttrValueI18n21Entity updateEntity = new MaterialAttrValueI18n21Entity();
|
||||
updateEntity.setRowId(rowId);
|
||||
updateEntity.setEnableState(state);
|
||||
updateEntity.setUpdatedBy(SessionUtil.getRealName());
|
||||
updateEntity.setUpdatedTime(LocalDateTime.now());
|
||||
return materialAttrValueI18n21Mapper.updateById(updateEntity) == 1;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -164,13 +164,13 @@ public class MaterialAttrValueService extends ServiceImpl<MaterialAttrValueMappe
|
|||
|
||||
public ResultVO<MaterialAttrValueI18n21Entity> getI18n21(String attrValueCn) {
|
||||
LambdaQueryWrapper<MaterialAttrValueI18n21Entity> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(MaterialAttrValueI18n21Entity::getAttrValueCn, attrValueCn).eq(MaterialAttrValueI18n21Entity::getDelFlag, "N");
|
||||
queryWrapper.eq(MaterialAttrValueI18n21Entity::getAttrValueCn, attrValueCn).eq(MaterialAttrValueI18n21Entity::getEnableState, 1);
|
||||
return ResultVO.success(materialAttrValueI18n21Mapper.selectOne(queryWrapper));
|
||||
}
|
||||
|
||||
public ResultVO<List<MaterialAttrValueI18n21Entity>> getI18n21List(String attrValueCn) {
|
||||
LambdaQueryWrapper<MaterialAttrValueI18n21Entity> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.like(MaterialAttrValueI18n21Entity::getAttrValueCn, attrValueCn).eq(MaterialAttrValueI18n21Entity::getDelFlag, "N");
|
||||
queryWrapper.like(MaterialAttrValueI18n21Entity::getAttrValueCn, attrValueCn).eq(MaterialAttrValueI18n21Entity::getEnableState, 1);
|
||||
return ResultVO.success(materialAttrValueI18n21Mapper.selectList(queryWrapper));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,18 +19,20 @@
|
|||
|
||||
<select id="getList" resultType="com.nflg.product.material.pojo.vo.MaterialAttrValueI18n21VO">
|
||||
select * from t_material_attr_value_i18n_21 where 1=1
|
||||
<if test="query.attrValueCn!=null and query.attrValueCn!=''">
|
||||
and attr_value_cn like concat('%',#{query.attrValueCn},'%')
|
||||
</if>
|
||||
<if test="query.attrValueRefer!=null and query.attrValueRefer!=''">
|
||||
and attr_value_refer like concat('%',#{query.attrValueRefer},'%')
|
||||
</if>
|
||||
<if test="query.attrValueEn!=null and query.attrValueEn!=''">
|
||||
and attr_value_en like concat('%',#{query.attrValueEn},'%')
|
||||
</if>
|
||||
<if test="query.delFlag!=null and query.delFlag!=''">
|
||||
and del_flag = #{query.delFlag}
|
||||
</if>
|
||||
<where>
|
||||
<if test="query.attrValueCn!=null and query.attrValueCn!=''">
|
||||
and attr_value_cn like concat('%',#{query.attrValueCn},'%')
|
||||
</if>
|
||||
<if test="query.attrValueRefer!=null and query.attrValueRefer!=''">
|
||||
and attr_value_refer like concat('%',#{query.attrValueRefer},'%')
|
||||
</if>
|
||||
<if test="query.attrValueEn!=null and query.attrValueEn!=''">
|
||||
and attr_value_en like concat('%',#{query.attrValueEn},'%')
|
||||
</if>
|
||||
<if test="query.enableState!=null">
|
||||
and enable_state = #{query.enableState}
|
||||
</if>
|
||||
</where>
|
||||
order by created_time desc
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
|||
Loading…
Reference in New Issue