From e237ae06faea7208cd1b2deca1822c91ff85f7ee Mon Sep 17 00:00:00 2001
From: Fancy <Fancy.fx@outlook.com>
Date: 星期三, 19 六月 2024 09:21:10 +0800
Subject: [PATCH] change table name
---
pms-parent/pms-global/src/main/resources/mapper/PltProductTestInspectionItemsMapper.xml | 31 +++++++--------
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/daoPlt/PltProductTestInspectionItemsMapper.java | 36 ++++++++++++++++++
pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/proTestItems/ProTestItemsSv.java | 21 +++++-----
pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/proTestItems/ProTestItemsCtrl.java | 16 +++----
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPlt/PltProductTestInspectionItems.java | 9 +---
5 files changed, 71 insertions(+), 42 deletions(-)
diff --git a/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/daoPlt/PltProductTestInspectionItemsMapper.java b/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/daoPlt/PltProductTestInspectionItemsMapper.java
new file mode 100644
index 0000000..dfb15bf
--- /dev/null
+++ b/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/daoPlt/PltProductTestInspectionItemsMapper.java
@@ -0,0 +1,36 @@
+package com.dy.pmsGlobal.daoPlt;
+
+import com.dy.pmsGlobal.pojoPlt.PltProductTestInspectionItems;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+* @author User
+* @description 閽堝琛ㄣ�恜lt_product_test_inspection_items(浜у搧娴嬭瘯妫�鏌ラ」鐩〃)銆戠殑鏁版嵁搴撴搷浣淢apper
+* @createDate 2024-06-19 09:05:53
+* @Entity com.dy.pmsGlobal.pojoPlt.PltProductTestInspectionItems
+*/
+@Mapper
+public interface PltProductTestInspectionItemsMapper {
+
+ int deleteByPrimaryKey(Long id);
+
+ int insert(PltProductTestInspectionItems record);
+
+ int insertSelective(PltProductTestInspectionItems record);
+
+ PltProductTestInspectionItems selectByPrimaryKey(Long id);
+
+ int updateByPrimaryKeySelective(PltProductTestInspectionItems record);
+
+ int updateByPrimaryKey(PltProductTestInspectionItems record);
+
+ Long selectSomeCount(Map<String,Object> params);
+
+ List<PltProductTestInspectionItems> selectSome(Map<String,Object> params);
+
+ int deleteLogicById(Long id);
+
+}
diff --git a/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPlt/PltProductTestItems.java b/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPlt/PltProductTestInspectionItems.java
similarity index 87%
rename from pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPlt/PltProductTestItems.java
rename to pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPlt/PltProductTestInspectionItems.java
index 33b2dae..9c056ff 100644
--- a/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPlt/PltProductTestItems.java
+++ b/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPlt/PltProductTestInspectionItems.java
@@ -15,15 +15,15 @@
/**
* 浜у搧娴嬭瘯妫�鏌ラ」鐩〃
- * @TableName plt_product_test_items
+ * @TableName plt_product_test_inspection_items
*/
-@TableName(value ="plt_product_test_items" , autoResultMap = true)
+@TableName(value ="plt_product_test_inspection_items", autoResultMap = true)
@Data
@Builder
@ToString
@NoArgsConstructor
@AllArgsConstructor
-public class PltProductTestItems implements BaseEntity {
+public class PltProductTestInspectionItems implements BaseEntity {
/**
*
*/
@@ -37,8 +37,6 @@
@JSONField(serializeUsing= ObjectWriterImplToString.class)
@NotNull(message = "浜у搧瀹炰綋缂栧彿涓嶈兘涓虹┖")
public Long proId;
-
-
/**
* 娴嬭瘯椤圭洰
@@ -60,6 +58,5 @@
/**
* 鎺掑簭
*/
-
public Integer sort;
}
\ No newline at end of file
diff --git a/pms-parent/pms-global/src/main/resources/mapper/PltProductTestItemsMapper.xml b/pms-parent/pms-global/src/main/resources/mapper/PltProductTestInspectionItemsMapper.xml
similarity index 84%
rename from pms-parent/pms-global/src/main/resources/mapper/PltProductTestItemsMapper.xml
rename to pms-parent/pms-global/src/main/resources/mapper/PltProductTestInspectionItemsMapper.xml
index 2bd29c9..3340f44 100644
--- a/pms-parent/pms-global/src/main/resources/mapper/PltProductTestItemsMapper.xml
+++ b/pms-parent/pms-global/src/main/resources/mapper/PltProductTestInspectionItemsMapper.xml
@@ -2,9 +2,9 @@
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.dy.pmsGlobal.daoPlt.PltProductTestItemsMapper">
+<mapper namespace="com.dy.pmsGlobal.daoPlt.PltProductTestInspectionItemsMapper">
- <resultMap id="BaseResultMap" type="com.dy.pmsGlobal.pojoPlt.PltProductTestItems">
+ <resultMap id="BaseResultMap" type="com.dy.pmsGlobal.pojoPlt.PltProductTestInspectionItems">
<id property="id" column="id" jdbcType="BIGINT"/>
<result property="proId" column="pro_id" jdbcType="BIGINT"/>
<result property="item" column="item" jdbcType="VARCHAR"/>
@@ -21,13 +21,13 @@
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
- from plt_product_test_items
+ from plt_product_test_inspection_items
where id = #{id,jdbcType=BIGINT}
</select>
<select id="selectSomeCount" resultType="java.lang.Long">
select count(1)
- from plt_product_test_items t
+ from plt_product_test_inspection_items t
where t.deleted!=1
<trim prefix="and" suffixOverrides="and">
<if test="proId != null and proId != ''">
@@ -42,7 +42,7 @@
<select id="selectSome" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
- from plt_product_test_items t
+ from plt_product_test_inspection_items t
where t.deleted!=1
<trim prefix="and" suffixOverrides="and">
<if test="proId != null and proId != ''">
@@ -60,13 +60,12 @@
</trim>
</select>
-
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
- delete from plt_product_test_items
+ delete from plt_product_test_inspection_items
where id = #{id,jdbcType=BIGINT}
</delete>
- <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.dy.pmsGlobal.pojoPlt.PltProductTestItems" useGeneratedKeys="true">
- insert into plt_product_test_items
+ <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.dy.pmsGlobal.pojoPlt.PltProductTestInspectionItems" useGeneratedKeys="true">
+ insert into plt_product_test_inspection_items
( id,pro_id,item
,deleted,disabled,sort
)
@@ -74,8 +73,8 @@
,#{deleted,jdbcType=TINYINT},#{disabled,jdbcType=TINYINT},#{sort,jdbcType=INTEGER}
)
</insert>
- <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.dy.pmsGlobal.pojoPlt.PltProductTestItems" useGeneratedKeys="true">
- insert into plt_product_test_items
+ <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.dy.pmsGlobal.pojoPlt.PltProductTestInspectionItems" useGeneratedKeys="true">
+ insert into plt_product_test_inspection_items
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="proId != null">pro_id,</if>
@@ -93,8 +92,8 @@
<if test="sort != null">#{sort,jdbcType=INTEGER},</if>
</trim>
</insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.dy.pmsGlobal.pojoPlt.PltProductTestItems">
- update plt_product_test_items
+ <update id="updateByPrimaryKeySelective" parameterType="com.dy.pmsGlobal.pojoPlt.PltProductTestInspectionItems">
+ update plt_product_test_inspection_items
<set>
<if test="proId != null">
pro_id = #{proId,jdbcType=BIGINT},
@@ -114,8 +113,8 @@
</set>
where id = #{id,jdbcType=BIGINT}
</update>
- <update id="updateByPrimaryKey" parameterType="com.dy.pmsGlobal.pojoPlt.PltProductTestItems">
- update plt_product_test_items
+ <update id="updateByPrimaryKey" parameterType="com.dy.pmsGlobal.pojoPlt.PltProductTestInspectionItems">
+ update plt_product_test_inspection_items
set
pro_id = #{proId,jdbcType=BIGINT},
item = #{item,jdbcType=VARCHAR},
@@ -125,7 +124,7 @@
where id = #{id,jdbcType=BIGINT}
</update>
<update id="deleteLogicById" parameterType="java.lang.Long">
- update plt_product_test_items set deleted = 1
+ update plt_product_test_inspection_items set deleted = 1
where id = #{id}
</update>
</mapper>
diff --git a/pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/proTestItems/ProTestItemsCtrl.java b/pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/proTestItems/ProTestItemsCtrl.java
index 02b9526..21aa27d 100644
--- a/pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/proTestItems/ProTestItemsCtrl.java
+++ b/pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/proTestItems/ProTestItemsCtrl.java
@@ -6,10 +6,8 @@
import com.dy.common.webUtil.BaseResponseUtils;
import com.dy.common.webUtil.QueryResultVo;
import com.dy.pmsGlobal.aop.Log;
-import com.dy.pmsGlobal.pojoPlt.PltProductTestItems;
+import com.dy.pmsGlobal.pojoPlt.PltProductTestInspectionItems;
import com.dy.pmsGlobal.pojoPlt.PltProductUnqualifiedReason;
-import com.dy.pmsPlatform.proTestItems.ProTestItemsSv;
-import com.dy.pmsPlatform.proTestItems.QueryVo;
import jakarta.validation.Valid;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
@@ -38,7 +36,7 @@
@PostMapping(path="save")
@SsoPowerAop(power = "10300003")
@Log("淇濆瓨浜у搧鍝佽川妫�鏌ラ」鐩俊鎭�")
- public BaseResponse<Boolean> save(@RequestBody @Valid PltProductTestItems item){
+ public BaseResponse<Boolean> save(@RequestBody @Valid PltProductTestInspectionItems item){
item.deleted = false;
item.disabled = false;
int count =sv.save(item);
@@ -58,7 +56,7 @@
@PostMapping(path="update")
@SsoPowerAop(power = "10300003")
@Log("鏇存柊浜у搧鍝佽川妫�鏌ラ」鐩俊鎭�")
- public BaseResponse<Boolean> update(@RequestBody @Valid PltProductTestItems item){
+ public BaseResponse<Boolean> update(@RequestBody @Valid PltProductTestInspectionItems item){
int count = sv.update(item);
if (count <= 0) {
return BaseResponseUtils.buildFail("鏁版嵁搴撳瓨鍌ㄥけ璐�");
@@ -94,8 +92,8 @@
@GetMapping(path="one")
@SsoPowerAop(power = "10300002") //鐧诲綍涓庢潈闄愬悓鏃堕獙璇�
@Log("鏍规嵁ID鏌ヨ浜у搧鍝佽川妫�鏌ラ」鐩俊鎭�")
- public BaseResponse<PltProductTestItems> one(String id){
- PltProductTestItems item=sv.selectById(id);
+ public BaseResponse<PltProductTestInspectionItems> one(String id){
+ PltProductTestInspectionItems item=sv.selectById(id);
return BaseResponseUtils.buildSuccess(JSON.toJSON(item));
}
@@ -107,8 +105,8 @@
@PostMapping(path="some")
@SsoPowerAop(power = "10300002")
@Log("鏌ヨ浜у搧鍝佽川妫�鏌ラ」鐩俊鎭�")
- public BaseResponse<QueryResultVo<List<PltProductTestItems>>> some(@RequestBody QueryVo vo){
- QueryResultVo<List<PltProductTestItems>> list = sv.selectSome(vo) ;
+ public BaseResponse<QueryResultVo<List<PltProductTestInspectionItems>>> some(@RequestBody QueryVo vo){
+ QueryResultVo<List<PltProductTestInspectionItems>> list = sv.selectSome(vo) ;
return BaseResponseUtils.buildSuccess(list);
}
/**
diff --git a/pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/proTestItems/ProTestItemsSv.java b/pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/proTestItems/ProTestItemsSv.java
index 3efca47..633ed98 100644
--- a/pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/proTestItems/ProTestItemsSv.java
+++ b/pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/proTestItems/ProTestItemsSv.java
@@ -1,9 +1,8 @@
package com.dy.pmsPlatform.proTestItems;
import com.dy.common.webUtil.QueryResultVo;
-import com.dy.pmsGlobal.daoPlt.PltProductTestItemsMapper;
-import com.dy.pmsGlobal.pojoPlt.PltProductTestItems;
-import com.dy.pmsPlatform.proTestItems.QueryVo;
+import com.dy.pmsGlobal.daoPlt.PltProductTestInspectionItemsMapper;
+import com.dy.pmsGlobal.pojoPlt.PltProductTestInspectionItems;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.common.utils.PojoUtils;
import org.springframework.stereotype.Service;
@@ -14,14 +13,14 @@
@Slf4j
@Service
public class ProTestItemsSv {
- private final PltProductTestItemsMapper dao;
+ private final PltProductTestInspectionItemsMapper dao;
- public ProTestItemsSv(PltProductTestItemsMapper dao) {
+ public ProTestItemsSv(PltProductTestInspectionItemsMapper dao) {
this.dao = dao;
}
@Transactional
- public int save(PltProductTestItems item) {
+ public int save(PltProductTestInspectionItems item) {
int count = dao.insertSelective(item);
return count;
}
@@ -39,26 +38,26 @@
@Transactional
- public int update(PltProductTestItems item) {
+ public int update(PltProductTestInspectionItems item) {
int count = dao.updateByPrimaryKeySelective(item);
return count;
}
- public PltProductTestItems selectById(String paramId) {
+ public PltProductTestInspectionItems selectById(String paramId) {
return dao.selectByPrimaryKey(Long.valueOf(paramId));
}
/**
* 鑾峰彇鍒楄〃
*/
- public QueryResultVo<List<PltProductTestItems>> selectSome(QueryVo queryVo) {
+ public QueryResultVo<List<PltProductTestInspectionItems>> selectSome(QueryVo queryVo) {
Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(queryVo);
//鏌ヨ绗﹀悎鏉′欢鐨勮褰曟�绘暟
Long itemTotal = this.dao.selectSomeCount(params);
- QueryResultVo<List<PltProductTestItems>> rsVo = new QueryResultVo<>(queryVo.pageSize, queryVo.pageCurr) ;
+ QueryResultVo<List<PltProductTestInspectionItems>> rsVo = new QueryResultVo<>(queryVo.pageSize, queryVo.pageCurr) ;
//璁$畻鍒嗛〉绛変俊鎭�
rsVo.calculateAndSet(itemTotal, params);
@@ -69,7 +68,7 @@
@Transactional
public int disabled(Long id, Boolean disabled) {
- PltProductTestItems item = new PltProductTestItems();
+ PltProductTestInspectionItems item = new PltProductTestInspectionItems();
item.setId(id);
item.setDisabled(disabled);
return dao.updateByPrimaryKeySelective(item);
--
Gitblit v1.8.0