Procházet zdrojové kódy

律师增加 银行卡列表

liudongzhi před 3 týdny
rodič
revize
83393693cf

+ 11 - 0
alien-lawyer/src/main/java/shop/alien/lawyer/controller/LawyerUserController.java

@@ -7,6 +7,7 @@ import lombok.extern.slf4j.Slf4j;
 import org.springframework.web.bind.annotation.*;
 import shop.alien.entity.result.R;
 import shop.alien.entity.store.LawyerUser;
+import shop.alien.entity.store.StoreDictionary;
 import shop.alien.entity.store.dto.LawyerPaymentAccountDto;
 import shop.alien.entity.store.dto.LawyerRecommendedDto;
 import shop.alien.entity.store.dto.LawyerUserDto;
@@ -382,5 +383,15 @@ public class LawyerUserController {
         return lawyerUserService.getLawyerPaymentAccounts(lawyerId);
     }
 
+
+    @ApiOperation("获取字典")
+    @ApiOperationSupport(order = 1)
+    @ApiImplicitParams({@ApiImplicitParam(name = "dictType", value = "字典类型", dataType = "String", paramType = "query", required = true)})
+    @GetMapping("/getDict")
+    public R<List<StoreDictionary>> getDict(String dictType) {
+        return R.data(lawyerUserService.getDict(dictType));
+    }
+
+
 }
 

+ 11 - 0
alien-lawyer/src/main/java/shop/alien/lawyer/service/LawyerUserService.java

@@ -4,10 +4,12 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.service.IService;
 import shop.alien.entity.result.R;
 import shop.alien.entity.store.LawyerUser;
+import shop.alien.entity.store.StoreDictionary;
 import shop.alien.entity.store.dto.LawyerUserDto;
 import shop.alien.entity.store.vo.LawyerUserVo;
 
 import javax.servlet.http.HttpServletResponse;
+import java.util.List;
 import java.util.Map;
 
 /**
@@ -205,5 +207,14 @@ public interface LawyerUserService extends IService<LawyerUser> {
     R<Boolean> saveLawyerBankAccount(Integer lawyerId, String bankCardNo, String bankName);
 
     R<Map<String, String>> getLawyerPaymentAccounts(Integer lawyerId);
+
+    /**
+     * 查询字典值
+     *
+     * @param dictType 字典类型
+     * @return list
+     */
+    List<StoreDictionary> getDict(String dictType);
+
 }
 

+ 17 - 0
alien-lawyer/src/main/java/shop/alien/lawyer/service/impl/LawyerUserServiceImpl.java

@@ -57,6 +57,7 @@ public class LawyerUserServiceImpl extends ServiceImpl<LawyerUserMapper, LawyerU
     private final OrderReviewMapper orderReviewMapper;
     private final LifeNoticeMapper lifeNoticeMapper;
     private final LawyerLicenseVerifyUtil lawyerLicenseVerifyUtil;
+    private final StoreDictionaryMapper storeDictionaryMapper;
 
     @Override
     public R<IPage<LawyerUser>> getLawyerUserList(int pageNum, int pageSize, String name, String phone, Integer status) {
@@ -983,6 +984,22 @@ public class LawyerUserServiceImpl extends ServiceImpl<LawyerUserMapper, LawyerU
         return R.data(result);
     }
 
+
+    /**
+     * 查询字典值
+     *
+     * @param dictType 字典类型
+     * @return list
+     */
+    @Override
+    public List<StoreDictionary> getDict(String dictType) {
+        LambdaQueryWrapper<StoreDictionary> queryWrapper = new LambdaQueryWrapper<>();
+        queryWrapper.eq(StoreDictionary::getTypeName, dictType);
+        queryWrapper.eq(StoreDictionary::getDeleteFlag, 0);
+        return storeDictionaryMapper.selectList(queryWrapper);
+    }
+
+
     /**
      * 将LawyerUserVo转换为LawyerUserExcelVo
      *