From af2f6f6b7fad782c77898980b9154e06eb8a1595 Mon Sep 17 00:00:00 2001
From: wuxw <928255095@qq.com>
Date: 星期三, 16 十一月 2022 22:44:55 +0800
Subject: [PATCH] 加入供应商 功能
---
service-scm/src/main/java/com/java110/scm/cmd/supplier/ListSupplierCmd.java | 86 +++++
service-scm/src/main/java/com/java110/scm/smo/impl/SupplierV1InnerServiceSMOImpl.java | 89 +++++
java110-interface/src/main/java/com/java110/intf/scm/ISupplierV1InnerServiceSMO.java | 68 ++++
service-scm/src/main/java/com/java110/scm/dao/ISupplierV1ServiceDao.java | 77 ++++
java110-bean/src/main/java/com/java110/dto/supplier/SupplierDto.java | 104 ++++++
service-scm/src/main/java/com/java110/scm/cmd/supplier/DeleteSupplierCmd.java | 71 ++++
java110-db/src/main/resources/mapper/scm/SupplierV1ServiceDaoImplMapper.xml | 142 ++++++++
service-scm/src/main/java/com/java110/scm/cmd/supplier/UpdateSupplierCmd.java | 74 ++++
java110-bean/src/main/java/com/java110/po/supplier/SupplierPo.java | 103 ++++++
service-scm/src/main/java/com/java110/scm/cmd/supplier/SaveSupplierCmd.java | 80 ++++
service-scm/src/main/java/com/java110/scm/dao/impl/SupplierV1ServiceDaoImpl.java | 112 ++++++
11 files changed, 1,006 insertions(+), 0 deletions(-)
diff --git a/java110-bean/src/main/java/com/java110/dto/supplier/SupplierDto.java b/java110-bean/src/main/java/com/java110/dto/supplier/SupplierDto.java
new file mode 100644
index 0000000..889ae19
--- /dev/null
+++ b/java110-bean/src/main/java/com/java110/dto/supplier/SupplierDto.java
@@ -0,0 +1,104 @@
+package com.java110.dto.supplier;
+
+import com.java110.dto.PageDto;
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @ClassName FloorDto
+ * @Description 渚涘簲鍟嗘暟鎹眰灏佽
+ * @Author wuxw
+ * @Date 2019/4/24 8:52
+ * @Version 1.0
+ * add by wuxw 2019/4/24
+ **/
+public class SupplierDto extends PageDto implements Serializable {
+
+ private String supplierName;
+private String personName;
+private String supplierId;
+private String stId;
+private String beanName;
+private String startTime;
+private String remark;
+private String endTime;
+private String personTel;
+
+
+ private Date createTime;
+
+ private String statusCd = "0";
+
+
+ public String getSupplierName() {
+ return supplierName;
+ }
+public void setSupplierName(String supplierName) {
+ this.supplierName = supplierName;
+ }
+public String getPersonName() {
+ return personName;
+ }
+public void setPersonName(String personName) {
+ this.personName = personName;
+ }
+public String getSupplierId() {
+ return supplierId;
+ }
+public void setSupplierId(String supplierId) {
+ this.supplierId = supplierId;
+ }
+public String getStId() {
+ return stId;
+ }
+public void setStId(String stId) {
+ this.stId = stId;
+ }
+public String getBeanName() {
+ return beanName;
+ }
+public void setBeanName(String beanName) {
+ this.beanName = beanName;
+ }
+public String getStartTime() {
+ return startTime;
+ }
+public void setStartTime(String startTime) {
+ this.startTime = startTime;
+ }
+public String getRemark() {
+ return remark;
+ }
+public void setRemark(String remark) {
+ this.remark = remark;
+ }
+public String getEndTime() {
+ return endTime;
+ }
+public void setEndTime(String endTime) {
+ this.endTime = endTime;
+ }
+public String getPersonTel() {
+ return personTel;
+ }
+public void setPersonTel(String personTel) {
+ this.personTel = personTel;
+ }
+
+
+ public Date getCreateTime() {
+ return createTime;
+ }
+
+ public void setCreateTime(Date createTime) {
+ this.createTime = createTime;
+ }
+
+ public String getStatusCd() {
+ return statusCd;
+ }
+
+ public void setStatusCd(String statusCd) {
+ this.statusCd = statusCd;
+ }
+}
diff --git a/java110-bean/src/main/java/com/java110/po/supplier/SupplierPo.java b/java110-bean/src/main/java/com/java110/po/supplier/SupplierPo.java
new file mode 100644
index 0000000..ca9ecd1
--- /dev/null
+++ b/java110-bean/src/main/java/com/java110/po/supplier/SupplierPo.java
@@ -0,0 +1,103 @@
+/*
+ * Copyright 2017-2020 鍚村鏂� and java110 team.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.java110.po.supplier;
+
+import java.io.Serializable;
+import java.util.Date;
+/**
+ * 绫昏〃杩帮細 Po 鏁版嵁妯″瀷瀹炰綋瀵硅薄 鍩烘湰淇濇寔涓庢暟鎹簱妯″瀷涓�鐩� 鐢ㄤ簬 澧炲姞淇敼鍒犻櫎 绛夋椂鐨勬暟鎹浇浣�
+ * add by 鍚村鏂� at 2022-11-16 22:41:15 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 瀹樼綉锛歨ttp://www.homecommunity.cn
+ * 娓╅Θ鎻愮ず锛氬鏋滄偍瀵规鏂囦欢杩涜淇敼 璇蜂笉瑕佸垹闄ゅ師鏈変綔鑰呭強娉ㄩ噴淇℃伅锛岃琛ュ厖鎮ㄧ殑 淇敼鐨勫師鍥犱互鍙婅仈绯婚偖绠卞涓�
+ * // modify by 寮犱笁 at 2021-09-12 绗�10琛屽湪鏌愮鍦烘櫙涓嬪瓨鍦ㄦ煇绉峛ug 闇�瑕佷慨澶嶏紝娉ㄩ噴10鑷�20琛� 鍔犲叆 20琛岃嚦30琛�
+ */
+public class SupplierPo implements Serializable {
+
+ private String supplierName;
+private String personName;
+private String supplierId;
+private String stId;
+private String beanName;
+private String startTime;
+private String statusCd = "0";
+private String remark;
+private String endTime;
+private String personTel;
+public String getSupplierName() {
+ return supplierName;
+ }
+public void setSupplierName(String supplierName) {
+ this.supplierName = supplierName;
+ }
+public String getPersonName() {
+ return personName;
+ }
+public void setPersonName(String personName) {
+ this.personName = personName;
+ }
+public String getSupplierId() {
+ return supplierId;
+ }
+public void setSupplierId(String supplierId) {
+ this.supplierId = supplierId;
+ }
+public String getStId() {
+ return stId;
+ }
+public void setStId(String stId) {
+ this.stId = stId;
+ }
+public String getBeanName() {
+ return beanName;
+ }
+public void setBeanName(String beanName) {
+ this.beanName = beanName;
+ }
+public String getStartTime() {
+ return startTime;
+ }
+public void setStartTime(String startTime) {
+ this.startTime = startTime;
+ }
+public String getStatusCd() {
+ return statusCd;
+ }
+public void setStatusCd(String statusCd) {
+ this.statusCd = statusCd;
+ }
+public String getRemark() {
+ return remark;
+ }
+public void setRemark(String remark) {
+ this.remark = remark;
+ }
+public String getEndTime() {
+ return endTime;
+ }
+public void setEndTime(String endTime) {
+ this.endTime = endTime;
+ }
+public String getPersonTel() {
+ return personTel;
+ }
+public void setPersonTel(String personTel) {
+ this.personTel = personTel;
+ }
+
+
+
+}
diff --git a/java110-db/src/main/resources/mapper/scm/SupplierV1ServiceDaoImplMapper.xml b/java110-db/src/main/resources/mapper/scm/SupplierV1ServiceDaoImplMapper.xml
new file mode 100644
index 0000000..8790547
--- /dev/null
+++ b/java110-db/src/main/resources/mapper/scm/SupplierV1ServiceDaoImplMapper.xml
@@ -0,0 +1,142 @@
+<?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="supplierV1ServiceDaoImpl">
+
+
+
+
+
+ <!-- 淇濆瓨渚涘簲鍟嗕俊鎭� add by wuxw 2018-07-03 -->
+ <insert id="saveSupplierInfo" parameterType="Map">
+ insert into supplier(
+supplier_name,person_name,supplier_id,st_id,bean_name,start_time,remark,end_time,person_tel
+) values (
+#{supplierName},#{personName},#{supplierId},#{stId},#{beanName},#{startTime},#{remark},#{endTime},#{personTel}
+)
+ </insert>
+
+
+
+ <!-- 鏌ヨ渚涘簲鍟嗕俊鎭� add by wuxw 2018-07-03 -->
+ <select id="getSupplierInfo" parameterType="Map" resultType="Map">
+ select t.supplier_name,t.supplier_name supplierName,t.person_name,t.person_name personName,t.supplier_id,t.supplier_id supplierId,t.st_id,t.st_id stId,t.bean_name,t.bean_name beanName,t.start_time,t.start_time startTime,t.status_cd,t.status_cd statusCd,t.remark,t.end_time,t.end_time endTime,t.person_tel,t.person_tel personTel
+from supplier t
+where 1 =1
+<if test="supplierName !=null and supplierName != ''">
+ and t.supplier_name= #{supplierName}
+</if>
+<if test="personName !=null and personName != ''">
+ and t.person_name= #{personName}
+</if>
+<if test="supplierId !=null and supplierId != ''">
+ and t.supplier_id= #{supplierId}
+</if>
+<if test="stId !=null and stId != ''">
+ and t.st_id= #{stId}
+</if>
+<if test="beanName !=null and beanName != ''">
+ and t.bean_name= #{beanName}
+</if>
+<if test="startTime !=null and startTime != ''">
+ and t.start_time= #{startTime}
+</if>
+<if test="statusCd !=null and statusCd != ''">
+ and t.status_cd= #{statusCd}
+</if>
+<if test="remark !=null and remark != ''">
+ and t.remark= #{remark}
+</if>
+<if test="endTime !=null and endTime != ''">
+ and t.end_time= #{endTime}
+</if>
+<if test="personTel !=null and personTel != ''">
+ and t.person_tel= #{personTel}
+</if>
+order by t.create_time desc
+<if test="page != -1 and page != null ">
+ limit #{page}, #{row}
+</if>
+
+ </select>
+
+
+
+
+ <!-- 淇敼渚涘簲鍟嗕俊鎭� add by wuxw 2018-07-03 -->
+ <update id="updateSupplierInfo" parameterType="Map">
+ update supplier t set t.status_cd = #{statusCd}
+<if test="newBId != null and newBId != ''">
+,t.b_id = #{newBId}
+</if>
+<if test="supplierName !=null and supplierName != ''">
+, t.supplier_name= #{supplierName}
+</if>
+<if test="personName !=null and personName != ''">
+, t.person_name= #{personName}
+</if>
+<if test="stId !=null and stId != ''">
+, t.st_id= #{stId}
+</if>
+<if test="beanName !=null and beanName != ''">
+, t.bean_name= #{beanName}
+</if>
+<if test="startTime !=null and startTime != ''">
+, t.start_time= #{startTime}
+</if>
+<if test="remark !=null and remark != ''">
+, t.remark= #{remark}
+</if>
+<if test="endTime !=null and endTime != ''">
+, t.end_time= #{endTime}
+</if>
+<if test="personTel !=null and personTel != ''">
+, t.person_tel= #{personTel}
+</if>
+ where 1=1 <if test="supplierId !=null and supplierId != ''">
+and t.supplier_id= #{supplierId}
+</if>
+
+ </update>
+
+ <!-- 鏌ヨ渚涘簲鍟嗘暟閲� add by wuxw 2018-07-03 -->
+ <select id="querySuppliersCount" parameterType="Map" resultType="Map">
+ select count(1) count
+from supplier t
+where 1 =1
+<if test="supplierName !=null and supplierName != ''">
+ and t.supplier_name= #{supplierName}
+</if>
+<if test="personName !=null and personName != ''">
+ and t.person_name= #{personName}
+</if>
+<if test="supplierId !=null and supplierId != ''">
+ and t.supplier_id= #{supplierId}
+</if>
+<if test="stId !=null and stId != ''">
+ and t.st_id= #{stId}
+</if>
+<if test="beanName !=null and beanName != ''">
+ and t.bean_name= #{beanName}
+</if>
+<if test="startTime !=null and startTime != ''">
+ and t.start_time= #{startTime}
+</if>
+<if test="statusCd !=null and statusCd != ''">
+ and t.status_cd= #{statusCd}
+</if>
+<if test="remark !=null and remark != ''">
+ and t.remark= #{remark}
+</if>
+<if test="endTime !=null and endTime != ''">
+ and t.end_time= #{endTime}
+</if>
+<if test="personTel !=null and personTel != ''">
+ and t.person_tel= #{personTel}
+</if>
+
+
+ </select>
+
+</mapper>
diff --git a/java110-interface/src/main/java/com/java110/intf/scm/ISupplierV1InnerServiceSMO.java b/java110-interface/src/main/java/com/java110/intf/scm/ISupplierV1InnerServiceSMO.java
new file mode 100644
index 0000000..66e486b
--- /dev/null
+++ b/java110-interface/src/main/java/com/java110/intf/scm/ISupplierV1InnerServiceSMO.java
@@ -0,0 +1,68 @@
+/*
+ * Copyright 2017-2020 鍚村鏂� and java110 team.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.java110.intf.scm;
+
+import com.java110.config.feign.FeignConfiguration;
+import com.java110.dto.supplier.SupplierDto;
+import com.java110.po.supplier.SupplierPo;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+
+import java.util.List;
+
+/**
+ * 绫昏〃杩帮細 鏈嶅姟涔嬪墠璋冪敤鐨勬帴鍙g被锛屼笉瀵瑰鎻愪緵鎺ュ彛鑳藉姏 鍙敤浜庢帴鍙e缓璋冪敤
+ * add by 鍚村鏂� at 2022-11-16 22:41:15 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 瀹樼綉锛歨ttp://www.homecommunity.cn
+ * 娓╅Θ鎻愮ず锛氬鏋滄偍瀵规鏂囦欢杩涜淇敼 璇蜂笉瑕佸垹闄ゅ師鏈変綔鑰呭強娉ㄩ噴淇℃伅锛岃琛ュ厖鎮ㄧ殑 淇敼鐨勫師鍥犱互鍙婅仈绯婚偖绠卞涓�
+ * // modify by 寮犱笁 at 2021-09-12 绗�10琛屽湪鏌愮鍦烘櫙涓嬪瓨鍦ㄦ煇绉峛ug 闇�瑕佷慨澶嶏紝娉ㄩ噴10鑷�20琛� 鍔犲叆 20琛岃嚦30琛�
+ */
+@FeignClient(name = "scm-service", configuration = {FeignConfiguration.class})
+@RequestMapping("/supplierV1Api")
+public interface ISupplierV1InnerServiceSMO {
+
+
+ @RequestMapping(value = "/saveSupplier", method = RequestMethod.POST)
+ public int saveSupplier(@RequestBody SupplierPo supplierPo);
+
+ @RequestMapping(value = "/updateSupplier", method = RequestMethod.POST)
+ public int updateSupplier(@RequestBody SupplierPo supplierPo);
+
+ @RequestMapping(value = "/deleteSupplier", method = RequestMethod.POST)
+ public int deleteSupplier(@RequestBody SupplierPo supplierPo);
+
+ /**
+ * <p>鏌ヨ灏忓尯妤间俊鎭�</p>
+ *
+ *
+ * @param supplierDto 鏁版嵁瀵硅薄鍒嗕韩
+ * @return SupplierDto 瀵硅薄鏁版嵁
+ */
+ @RequestMapping(value = "/querySuppliers", method = RequestMethod.POST)
+ List<SupplierDto> querySuppliers(@RequestBody SupplierDto supplierDto);
+
+ /**
+ * 鏌ヨ<p>灏忓尯妤�</p>鎬昏褰曟暟
+ *
+ * @param supplierDto 鏁版嵁瀵硅薄鍒嗕韩
+ * @return 灏忓尯涓嬬殑灏忓尯妤艰褰曟暟
+ */
+ @RequestMapping(value = "/querySuppliersCount", method = RequestMethod.POST)
+ int querySuppliersCount(@RequestBody SupplierDto supplierDto);
+}
diff --git a/service-scm/src/main/java/com/java110/scm/cmd/supplier/DeleteSupplierCmd.java b/service-scm/src/main/java/com/java110/scm/cmd/supplier/DeleteSupplierCmd.java
new file mode 100644
index 0000000..25d7eaf
--- /dev/null
+++ b/service-scm/src/main/java/com/java110/scm/cmd/supplier/DeleteSupplierCmd.java
@@ -0,0 +1,71 @@
+/*
+ * Copyright 2017-2020 鍚村鏂� and java110 team.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.java110.scm.cmd.supplier;
+
+import com.alibaba.fastjson.JSONObject;
+import com.java110.core.annotation.Java110Cmd;
+import com.java110.core.annotation.Java110Transactional;
+import com.java110.core.context.ICmdDataFlowContext;
+import com.java110.core.event.cmd.Cmd;
+import com.java110.core.event.cmd.CmdEvent;
+import com.java110.core.factory.GenerateCodeFactory;
+import com.java110.intf.scm.ISupplierV1InnerServiceSMO;
+import com.java110.po.supplier.SupplierPo;
+import com.java110.utils.exception.CmdException;
+import com.java110.utils.util.Assert;
+import com.java110.utils.util.BeanConvertUtil;
+import com.java110.vo.ResultVo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * 绫昏〃杩帮細鍒犻櫎
+ * 鏈嶅姟缂栫爜锛歴upplier.deleteSupplier
+ * 璇锋眰璺姴锛�/app/supplier.DeleteSupplier
+ * add by 鍚村鏂� at 2022-11-16 22:41:15 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 瀹樼綉锛歨ttp://www.homecommunity.cn
+ * 娓╅Θ鎻愮ず锛氬鏋滄偍瀵规鏂囦欢杩涜淇敼 璇蜂笉瑕佸垹闄ゅ師鏈変綔鑰呭強娉ㄩ噴淇℃伅锛岃琛ュ厖鎮ㄧ殑 淇敼鐨勫師鍥犱互鍙婅仈绯婚偖绠卞涓�
+ * // modify by 寮犱笁 at 2021-09-12 绗�10琛屽湪鏌愮鍦烘櫙涓嬪瓨鍦ㄦ煇绉峛ug 闇�瑕佷慨澶嶏紝娉ㄩ噴10鑷�20琛� 鍔犲叆 20琛岃嚦30琛�
+ */
+@Java110Cmd(serviceCode = "supplier.deleteSupplier")
+public class DeleteSupplierCmd extends Cmd {
+ private static Logger logger = LoggerFactory.getLogger(DeleteSupplierCmd.class);
+
+ @Autowired
+ private ISupplierV1InnerServiceSMO supplierV1InnerServiceSMOImpl;
+
+ @Override
+ public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
+ Assert.hasKeyAndValue(reqJson, "supplierId", "supplierId涓嶈兘涓虹┖");
+
+ }
+
+ @Override
+ @Java110Transactional
+ public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+
+ SupplierPo supplierPo = BeanConvertUtil.covertBean(reqJson, SupplierPo.class);
+ int flag = supplierV1InnerServiceSMOImpl.deleteSupplier(supplierPo);
+
+ if (flag < 1) {
+ throw new CmdException("鍒犻櫎鏁版嵁澶辫触");
+ }
+
+ cmdDataFlowContext.setResponseEntity(ResultVo.success());
+ }
+}
diff --git a/service-scm/src/main/java/com/java110/scm/cmd/supplier/ListSupplierCmd.java b/service-scm/src/main/java/com/java110/scm/cmd/supplier/ListSupplierCmd.java
new file mode 100644
index 0000000..82998b9
--- /dev/null
+++ b/service-scm/src/main/java/com/java110/scm/cmd/supplier/ListSupplierCmd.java
@@ -0,0 +1,86 @@
+/*
+ * Copyright 2017-2020 鍚村鏂� and java110 team.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.java110.scm.cmd.supplier;
+
+import com.alibaba.fastjson.JSONObject;
+import com.java110.core.annotation.Java110Cmd;
+import com.java110.core.annotation.Java110Transactional;
+import com.java110.core.context.ICmdDataFlowContext;
+import com.java110.core.event.cmd.Cmd;
+import com.java110.core.event.cmd.CmdEvent;
+import com.java110.core.factory.GenerateCodeFactory;
+import com.java110.intf.scm.ISupplierV1InnerServiceSMO;
+import com.java110.po.supplier.SupplierPo;
+import com.java110.utils.exception.CmdException;
+import com.java110.utils.util.Assert;
+import com.java110.utils.util.BeanConvertUtil;
+import com.java110.vo.ResultVo;
+import org.springframework.beans.factory.annotation.Autowired;
+import com.java110.dto.supplier.SupplierDto;
+
+import java.util.List;
+import java.util.ArrayList;
+
+import org.springframework.http.ResponseEntity;
+import org.springframework.http.HttpStatus;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+/**
+ * 绫昏〃杩帮細鏌ヨ
+ * 鏈嶅姟缂栫爜锛歴upplier.listSupplier
+ * 璇锋眰璺姴锛�/app/supplier.ListSupplier
+ * add by 鍚村鏂� at 2022-11-16 22:41:15 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 瀹樼綉锛歨ttp://www.homecommunity.cn
+ * 娓╅Θ鎻愮ず锛氬鏋滄偍瀵规鏂囦欢杩涜淇敼 璇蜂笉瑕佸垹闄ゅ師鏈変綔鑰呭強娉ㄩ噴淇℃伅锛岃琛ュ厖鎮ㄧ殑 淇敼鐨勫師鍥犱互鍙婅仈绯婚偖绠卞涓�
+ * // modify by 寮犱笁 at 2021-09-12 绗�10琛屽湪鏌愮鍦烘櫙涓嬪瓨鍦ㄦ煇绉峛ug 闇�瑕佷慨澶嶏紝娉ㄩ噴10鑷�20琛� 鍔犲叆 20琛岃嚦30琛�
+ */
+@Java110Cmd(serviceCode = "supplier.listSupplier")
+public class ListSupplierCmd extends Cmd {
+
+ private static Logger logger = LoggerFactory.getLogger(ListSupplierCmd.class);
+ @Autowired
+ private ISupplierV1InnerServiceSMO supplierV1InnerServiceSMOImpl;
+
+ @Override
+ public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
+ super.validatePageInfo(reqJson);
+ }
+
+ @Override
+ public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+
+ SupplierDto supplierDto = BeanConvertUtil.covertBean(reqJson, SupplierDto.class);
+
+ int count = supplierV1InnerServiceSMOImpl.querySuppliersCount(supplierDto);
+
+ List<SupplierDto> supplierDtos = null;
+
+ if (count > 0) {
+ supplierDtos = supplierV1InnerServiceSMOImpl.querySuppliers(supplierDto);
+ } else {
+ supplierDtos = new ArrayList<>();
+ }
+
+ ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) reqJson.getInteger("row")), count, supplierDtos);
+
+ ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK);
+
+ cmdDataFlowContext.setResponseEntity(responseEntity);
+ }
+}
diff --git a/service-scm/src/main/java/com/java110/scm/cmd/supplier/SaveSupplierCmd.java b/service-scm/src/main/java/com/java110/scm/cmd/supplier/SaveSupplierCmd.java
new file mode 100644
index 0000000..9d437f1
--- /dev/null
+++ b/service-scm/src/main/java/com/java110/scm/cmd/supplier/SaveSupplierCmd.java
@@ -0,0 +1,80 @@
+/*
+ * Copyright 2017-2020 鍚村鏂� and java110 team.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.java110.scm.cmd.supplier;
+
+import com.alibaba.fastjson.JSONObject;
+import com.java110.core.annotation.Java110Cmd;
+import com.java110.core.annotation.Java110Transactional;
+import com.java110.core.context.ICmdDataFlowContext;
+import com.java110.core.event.cmd.Cmd;
+import com.java110.core.event.cmd.CmdEvent;
+import com.java110.core.factory.GenerateCodeFactory;
+import com.java110.intf.scm.ISupplierV1InnerServiceSMO;
+import com.java110.po.supplier.SupplierPo;
+import com.java110.utils.exception.CmdException;
+import com.java110.utils.util.Assert;
+import com.java110.utils.util.BeanConvertUtil;
+import com.java110.vo.ResultVo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * 绫昏〃杩帮細淇濆瓨
+ * 鏈嶅姟缂栫爜锛歴upplier.saveSupplier
+ * 璇锋眰璺姴锛�/app/supplier.SaveSupplier
+ * add by 鍚村鏂� at 2022-11-16 22:41:15 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 瀹樼綉锛歨ttp://www.homecommunity.cn
+ * 娓╅Θ鎻愮ず锛氬鏋滄偍瀵规鏂囦欢杩涜淇敼 璇蜂笉瑕佸垹闄ゅ師鏈変綔鑰呭強娉ㄩ噴淇℃伅锛岃琛ュ厖鎮ㄧ殑 淇敼鐨勫師鍥犱互鍙婅仈绯婚偖绠卞涓�
+ * // modify by 寮犱笁 at 2021-09-12 绗�10琛屽湪鏌愮鍦烘櫙涓嬪瓨鍦ㄦ煇绉峛ug 闇�瑕佷慨澶嶏紝娉ㄩ噴10鑷�20琛� 鍔犲叆 20琛岃嚦30琛�
+ */
+@Java110Cmd(serviceCode = "supplier.saveSupplier")
+public class SaveSupplierCmd extends Cmd {
+
+ private static Logger logger = LoggerFactory.getLogger(SaveSupplierCmd.class);
+
+ public static final String CODE_PREFIX_ID = "10";
+
+ @Autowired
+ private ISupplierV1InnerServiceSMO supplierV1InnerServiceSMOImpl;
+
+ @Override
+ public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
+ Assert.hasKeyAndValue(reqJson, "stId", "璇锋眰鎶ユ枃涓湭鍖呭惈stId");
+ Assert.hasKeyAndValue(reqJson, "supplierName", "璇锋眰鎶ユ枃涓湭鍖呭惈supplierName");
+ Assert.hasKeyAndValue(reqJson, "personName", "璇锋眰鎶ユ枃涓湭鍖呭惈personName");
+ Assert.hasKeyAndValue(reqJson, "personTel", "璇锋眰鎶ユ枃涓湭鍖呭惈personTel");
+ Assert.hasKeyAndValue(reqJson, "startTime", "璇锋眰鎶ユ枃涓湭鍖呭惈startTime");
+ Assert.hasKeyAndValue(reqJson, "endTime", "璇锋眰鎶ユ枃涓湭鍖呭惈endTime");
+
+ }
+
+ @Override
+ @Java110Transactional
+ public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+
+ SupplierPo supplierPo = BeanConvertUtil.covertBean(reqJson, SupplierPo.class);
+ supplierPo.setSupplierId(GenerateCodeFactory.getGeneratorId(CODE_PREFIX_ID));
+ int flag = supplierV1InnerServiceSMOImpl.saveSupplier(supplierPo);
+
+ if (flag < 1) {
+ throw new CmdException("淇濆瓨鏁版嵁澶辫触");
+ }
+
+ cmdDataFlowContext.setResponseEntity(ResultVo.success());
+ }
+}
diff --git a/service-scm/src/main/java/com/java110/scm/cmd/supplier/UpdateSupplierCmd.java b/service-scm/src/main/java/com/java110/scm/cmd/supplier/UpdateSupplierCmd.java
new file mode 100644
index 0000000..6292b8f
--- /dev/null
+++ b/service-scm/src/main/java/com/java110/scm/cmd/supplier/UpdateSupplierCmd.java
@@ -0,0 +1,74 @@
+/*
+ * Copyright 2017-2020 鍚村鏂� and java110 team.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.java110.scm.cmd.supplier;
+
+import com.alibaba.fastjson.JSONObject;
+import com.java110.core.annotation.Java110Cmd;
+import com.java110.core.annotation.Java110Transactional;
+import com.java110.core.context.ICmdDataFlowContext;
+import com.java110.core.event.cmd.Cmd;
+import com.java110.core.event.cmd.CmdEvent;
+import com.java110.core.factory.GenerateCodeFactory;
+import com.java110.intf.scm.ISupplierV1InnerServiceSMO;
+import com.java110.po.supplier.SupplierPo;
+import com.java110.utils.exception.CmdException;
+import com.java110.utils.util.Assert;
+import com.java110.utils.util.BeanConvertUtil;
+import com.java110.vo.ResultVo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+/**
+ * 绫昏〃杩帮細鏇存柊
+ * 鏈嶅姟缂栫爜锛歴upplier.updateSupplier
+ * 璇锋眰璺姴锛�/app/supplier.UpdateSupplier
+ * add by 鍚村鏂� at 2022-11-16 22:41:15 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 瀹樼綉锛歨ttp://www.homecommunity.cn
+ * 娓╅Θ鎻愮ず锛氬鏋滄偍瀵规鏂囦欢杩涜淇敼 璇蜂笉瑕佸垹闄ゅ師鏈変綔鑰呭強娉ㄩ噴淇℃伅锛岃琛ュ厖鎮ㄧ殑 淇敼鐨勫師鍥犱互鍙婅仈绯婚偖绠卞涓�
+ * // modify by 寮犱笁 at 2021-09-12 绗�10琛屽湪鏌愮鍦烘櫙涓嬪瓨鍦ㄦ煇绉峛ug 闇�瑕佷慨澶嶏紝娉ㄩ噴10鑷�20琛� 鍔犲叆 20琛岃嚦30琛�
+ */
+@Java110Cmd(serviceCode = "supplier.updateSupplier")
+public class UpdateSupplierCmd extends Cmd {
+
+ private static Logger logger = LoggerFactory.getLogger(UpdateSupplierCmd.class);
+
+
+ @Autowired
+ private ISupplierV1InnerServiceSMO supplierV1InnerServiceSMOImpl;
+
+ @Override
+ public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
+ Assert.hasKeyAndValue(reqJson, "supplierId", "supplierId涓嶈兘涓虹┖");
+
+ }
+
+ @Override
+ @Java110Transactional
+ public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+
+ SupplierPo supplierPo = BeanConvertUtil.covertBean(reqJson, SupplierPo.class);
+ int flag = supplierV1InnerServiceSMOImpl.updateSupplier(supplierPo);
+
+ if (flag < 1) {
+ throw new CmdException("鏇存柊鏁版嵁澶辫触");
+ }
+
+ cmdDataFlowContext.setResponseEntity(ResultVo.success());
+ }
+}
diff --git a/service-scm/src/main/java/com/java110/scm/dao/ISupplierV1ServiceDao.java b/service-scm/src/main/java/com/java110/scm/dao/ISupplierV1ServiceDao.java
new file mode 100644
index 0000000..72fd322
--- /dev/null
+++ b/service-scm/src/main/java/com/java110/scm/dao/ISupplierV1ServiceDao.java
@@ -0,0 +1,77 @@
+/*
+ * Copyright 2017-2020 鍚村鏂� and java110 team.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.java110.scm.dao;
+
+
+import com.java110.utils.exception.DAOException;
+import com.java110.entity.merchant.BoMerchant;
+import com.java110.entity.merchant.BoMerchantAttr;
+import com.java110.entity.merchant.Merchant;
+import com.java110.entity.merchant.MerchantAttr;
+
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 绫昏〃杩帮細
+ * add by 鍚村鏂� at 2022-11-16 22:41:15 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 瀹樼綉锛歨ttp://www.homecommunity.cn
+ * 娓╅Θ鎻愮ず锛氬鏋滄偍瀵规鏂囦欢杩涜淇敼 璇蜂笉瑕佸垹闄ゅ師鏈変綔鑰呭強娉ㄩ噴淇℃伅锛岃琛ュ厖鎮ㄧ殑 淇敼鐨勫師鍥犱互鍙婅仈绯婚偖绠卞涓�
+ * // modify by 寮犱笁 at 2021-09-12 绗�10琛屽湪鏌愮鍦烘櫙涓嬪瓨鍦ㄦ煇绉峛ug 闇�瑕佷慨澶嶏紝娉ㄩ噴10鑷�20琛� 鍔犲叆 20琛岃嚦30琛�
+ */
+public interface ISupplierV1ServiceDao {
+
+
+ /**
+ * 淇濆瓨 渚涘簲鍟嗕俊鎭�
+ * @param info
+ * @throws DAOException DAO寮傚父
+ */
+ int saveSupplierInfo(Map info) throws DAOException;
+
+
+
+
+ /**
+ * 鏌ヨ渚涘簲鍟嗕俊鎭紙instance杩囩▼锛�
+ * 鏍规嵁bId 鏌ヨ渚涘簲鍟嗕俊鎭�
+ * @param info bId 淇℃伅
+ * @return 渚涘簲鍟嗕俊鎭�
+ * @throws DAOException DAO寮傚父
+ */
+ List<Map> getSupplierInfo(Map info) throws DAOException;
+
+
+
+ /**
+ * 淇敼渚涘簲鍟嗕俊鎭�
+ * @param info 淇敼淇℃伅
+ * @throws DAOException DAO寮傚父
+ */
+ int updateSupplierInfo(Map info) throws DAOException;
+
+
+ /**
+ * 鏌ヨ渚涘簲鍟嗘�绘暟
+ *
+ * @param info 渚涘簲鍟嗕俊鎭�
+ * @return 渚涘簲鍟嗘暟閲�
+ */
+ int querySuppliersCount(Map info);
+
+}
diff --git a/service-scm/src/main/java/com/java110/scm/dao/impl/SupplierV1ServiceDaoImpl.java b/service-scm/src/main/java/com/java110/scm/dao/impl/SupplierV1ServiceDaoImpl.java
new file mode 100644
index 0000000..e84d471
--- /dev/null
+++ b/service-scm/src/main/java/com/java110/scm/dao/impl/SupplierV1ServiceDaoImpl.java
@@ -0,0 +1,112 @@
+/*
+ * Copyright 2017-2020 鍚村鏂� and java110 team.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.java110.scm.dao.impl;
+
+import com.alibaba.fastjson.JSONObject;
+import com.java110.utils.constant.ResponseConstant;
+import com.java110.utils.exception.DAOException;
+import com.java110.utils.util.DateUtil;
+import com.java110.core.base.dao.BaseServiceDao;
+import com.java110.scm.dao.ISupplierV1ServiceDao;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 绫昏〃杩帮細
+ * add by 鍚村鏂� at 2022-11-16 22:41:15 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 瀹樼綉锛歨ttp://www.homecommunity.cn
+ * 娓╅Θ鎻愮ず锛氬鏋滄偍瀵规鏂囦欢杩涜淇敼 璇蜂笉瑕佸垹闄ゅ師鏈変綔鑰呭強娉ㄩ噴淇℃伅锛岃琛ュ厖鎮ㄧ殑 淇敼鐨勫師鍥犱互鍙婅仈绯婚偖绠卞涓�
+ * // modify by 寮犱笁 at 2021-09-12 绗�10琛屽湪鏌愮鍦烘櫙涓嬪瓨鍦ㄦ煇绉峛ug 闇�瑕佷慨澶嶏紝娉ㄩ噴10鑷�20琛� 鍔犲叆 20琛岃嚦30琛�
+ */
+@Service("supplierV1ServiceDaoImpl")
+public class SupplierV1ServiceDaoImpl extends BaseServiceDao implements ISupplierV1ServiceDao {
+
+ private static Logger logger = LoggerFactory.getLogger(SupplierV1ServiceDaoImpl.class);
+
+
+
+
+
+ /**
+ * 淇濆瓨渚涘簲鍟嗕俊鎭� 鍒� instance
+ * @param info bId 淇℃伅
+ * @throws DAOException DAO寮傚父
+ */
+ @Override
+ public int saveSupplierInfo(Map info) throws DAOException {
+ logger.debug("淇濆瓨 saveSupplierInfo 鍏ュ弬 info : {}",info);
+
+ int saveFlag = sqlSessionTemplate.insert("supplierV1ServiceDaoImpl.saveSupplierInfo",info);
+
+ return saveFlag;
+ }
+
+
+ /**
+ * 鏌ヨ渚涘簲鍟嗕俊鎭紙instance锛�
+ * @param info bId 淇℃伅
+ * @return List<Map>
+ * @throws DAOException DAO寮傚父
+ */
+ @Override
+ public List<Map> getSupplierInfo(Map info) throws DAOException {
+ logger.debug("鏌ヨ getSupplierInfo 鍏ュ弬 info : {}",info);
+
+ List<Map> businessSupplierInfos = sqlSessionTemplate.selectList("supplierV1ServiceDaoImpl.getSupplierInfo",info);
+
+ return businessSupplierInfos;
+ }
+
+
+ /**
+ * 淇敼渚涘簲鍟嗕俊鎭�
+ * @param info 淇敼淇℃伅
+ * @throws DAOException DAO寮傚父
+ */
+ @Override
+ public int updateSupplierInfo(Map info) throws DAOException {
+ logger.debug("淇敼 updateSupplierInfo 鍏ュ弬 info : {}",info);
+
+ int saveFlag = sqlSessionTemplate.update("supplierV1ServiceDaoImpl.updateSupplierInfo",info);
+
+ return saveFlag;
+ }
+
+ /**
+ * 鏌ヨ渚涘簲鍟嗘暟閲�
+ * @param info 渚涘簲鍟嗕俊鎭�
+ * @return 渚涘簲鍟嗘暟閲�
+ */
+ @Override
+ public int querySuppliersCount(Map info) {
+ logger.debug("鏌ヨ querySuppliersCount 鍏ュ弬 info : {}",info);
+
+ List<Map> businessSupplierInfos = sqlSessionTemplate.selectList("supplierV1ServiceDaoImpl.querySuppliersCount", info);
+ if (businessSupplierInfos.size() < 1) {
+ return 0;
+ }
+
+ return Integer.parseInt(businessSupplierInfos.get(0).get("count").toString());
+ }
+
+
+}
diff --git a/service-scm/src/main/java/com/java110/scm/smo/impl/SupplierV1InnerServiceSMOImpl.java b/service-scm/src/main/java/com/java110/scm/smo/impl/SupplierV1InnerServiceSMOImpl.java
new file mode 100644
index 0000000..5620835
--- /dev/null
+++ b/service-scm/src/main/java/com/java110/scm/smo/impl/SupplierV1InnerServiceSMOImpl.java
@@ -0,0 +1,89 @@
+/*
+ * Copyright 2017-2020 鍚村鏂� and java110 team.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.java110.scm.smo.impl;
+
+
+import com.java110.scm.dao.ISupplierV1ServiceDao;
+import com.java110.intf.scm.ISupplierV1InnerServiceSMO;
+import com.java110.dto.supplier.SupplierDto;
+import com.java110.po.supplier.SupplierPo;
+import com.java110.utils.util.BeanConvertUtil;
+import com.java110.core.base.smo.BaseServiceSMO;
+import com.java110.dto.user.UserDto;
+import com.java110.dto.PageDto;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * 绫昏〃杩帮細 鏈嶅姟涔嬪墠璋冪敤鐨勬帴鍙e疄鐜扮被锛屼笉瀵瑰鎻愪緵鎺ュ彛鑳藉姏 鍙敤浜庢帴鍙e缓璋冪敤
+ * add by 鍚村鏂� at 2022-11-16 22:41:15 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 瀹樼綉锛歨ttp://www.homecommunity.cn
+ * 娓╅Θ鎻愮ず锛氬鏋滄偍瀵规鏂囦欢杩涜淇敼 璇蜂笉瑕佸垹闄ゅ師鏈変綔鑰呭強娉ㄩ噴淇℃伅锛岃琛ュ厖鎮ㄧ殑 淇敼鐨勫師鍥犱互鍙婅仈绯婚偖绠卞涓�
+ * // modify by 寮犱笁 at 2021-09-12 绗�10琛屽湪鏌愮鍦烘櫙涓嬪瓨鍦ㄦ煇绉峛ug 闇�瑕佷慨澶嶏紝娉ㄩ噴10鑷�20琛� 鍔犲叆 20琛岃嚦30琛�
+ */
+@RestController
+public class SupplierV1InnerServiceSMOImpl extends BaseServiceSMO implements ISupplierV1InnerServiceSMO {
+
+ @Autowired
+ private ISupplierV1ServiceDao supplierV1ServiceDaoImpl;
+
+
+ @Override
+ public int saveSupplier(@RequestBody SupplierPo supplierPo) {
+ int saveFlag = supplierV1ServiceDaoImpl.saveSupplierInfo(BeanConvertUtil.beanCovertMap(supplierPo));
+ return saveFlag;
+ }
+
+ @Override
+ public int updateSupplier(@RequestBody SupplierPo supplierPo) {
+ int saveFlag = supplierV1ServiceDaoImpl.updateSupplierInfo(BeanConvertUtil.beanCovertMap(supplierPo));
+ return saveFlag;
+ }
+
+ @Override
+ public int deleteSupplier(@RequestBody SupplierPo supplierPo) {
+ supplierPo.setStatusCd("1");
+ int saveFlag = supplierV1ServiceDaoImpl.updateSupplierInfo(BeanConvertUtil.beanCovertMap(supplierPo));
+ return saveFlag;
+ }
+
+ @Override
+ public List<SupplierDto> querySuppliers(@RequestBody SupplierDto supplierDto) {
+
+ //鏍¢獙鏄惁浼犱簡 鍒嗛〉淇℃伅
+
+ int page = supplierDto.getPage();
+
+ if (page != PageDto.DEFAULT_PAGE) {
+ supplierDto.setPage((page - 1) * supplierDto.getRow());
+ }
+
+ List<SupplierDto> suppliers = BeanConvertUtil.covertBeanList(supplierV1ServiceDaoImpl.getSupplierInfo(BeanConvertUtil.beanCovertMap(supplierDto)), SupplierDto.class);
+
+ return suppliers;
+ }
+
+
+ @Override
+ public int querySuppliersCount(@RequestBody SupplierDto supplierDto) {
+ return supplierV1ServiceDaoImpl.querySuppliersCount(BeanConvertUtil.beanCovertMap(supplierDto)); }
+
+}
--
Gitblit v1.8.0