songyang 2 anni fa
parent
commit
819aa90dda

+ 8 - 1
src/main/java/com/dk/mdm/mapper/mst/MoneyAccountMapper.java

@@ -2,9 +2,9 @@ package com.dk.mdm.mapper.mst;
 
 import com.dk.mdm.model.pojo.mst.MoneyAccount;
 import com.dk.common.mapper.BaseMapper;
-import com.dk.mdm.model.query.mst.GoodsBrandQuery;
 import com.dk.mdm.model.query.mst.MoneyAccountQuery;
 import com.dk.mdm.model.response.mst.MoneyAccountResponse;
+import com.dk.mdm.model.response.sale.OrderResponse;
 import org.springframework.stereotype.Repository;
 
 import java.util.List;
@@ -34,5 +34,12 @@ public interface MoneyAccountMapper extends BaseMapper<MoneyAccount>{
     * @date   : 2024/3/2 16:19
     */
     Integer selectDisplayNo(MoneyAccountQuery moneyAccountQuery);
+
+    /**
+     * @desc   : 根据Id进行查询
+     * @author : songy
+     * @date   : 2024-03-03 9:25
+     */
+    MoneyAccountResponse selectById(String id);
 }
 

+ 8 - 0
src/main/java/com/dk/mdm/mapper/mst/MoneyAccountMapper.xml

@@ -99,6 +99,14 @@
         <include refid="Condition"/>
     </select>
 
+    <!-- 根据主键查询表t_mst_money_account的一行数据 -->
+    <select id="selectById" resultMap="BaseResultMap">
+        SELECT
+        <include refid="Base_Column_List"/>
+        FROM t_mst_money_account
+        WHERE mac_id = #{macId}::uuid
+    </select>
+
     <select id="selectDisplayNo" resultType="Integer">
         SELECT MAX(display_no) + 1  FROM dkic_b.t_mst_money_account ma
          WHERE ma.cp_id = #{cpId}

+ 1 - 7
src/main/java/com/dk/mdm/service/mst/MoneyAccountService.java

@@ -4,7 +4,6 @@ import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
 import com.dk.common.infrastructure.annotaiton.Pagination;
 import com.dk.common.infrastructure.constant.Constant;
 import com.dk.common.model.pojo.PageList;
-import com.dk.common.response.ResponseCodeEnum;
 import com.dk.common.response.ResponseResultUtil;
 import com.dk.common.response.ResponseResultVO;
 import com.dk.mdm.infrastructure.convert.mst.MoneyAccountConvert;
@@ -12,18 +11,13 @@ import com.dk.mdm.model.pojo.mst.MoneyAccount;
 import com.dk.mdm.mapper.mst.MoneyAccountMapper;
 import com.dk.common.service.BaseService;
 import com.dk.common.mapper.BaseMapper;
-import com.dk.mdm.model.pojo.mst.Staff;
-import com.dk.mdm.model.query.mst.GoodsBrandQuery;
 import com.dk.mdm.model.query.mst.MoneyAccountQuery;
 import com.dk.mdm.model.response.mst.MoneyAccountResponse;
 import com.dk.mdm.model.vo.mst.MoneyAccountVO;
-import com.dk.mdm.model.vo.mst.StaffVO;
 import com.dk.mdm.service.common.CommonService;
 import org.springframework.stereotype.Service;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.PostMapping;
 
 import java.util.Map;
 import java.util.UUID;
@@ -53,7 +47,7 @@ public class MoneyAccountService extends BaseService<MoneyAccount> {
 	 */
 	@Override
 	public String getPrimaryKey() {
-		return "moneyAccount_id";
+		return "mac_id";
 	}