Browse Source

代码注释持续完善

fushengqian 1 year ago
parent
commit
e9072151c2

+ 3 - 0
fuint-application/src/main/java/com/fuint/common/service/SourceService.java

@@ -19,6 +19,7 @@ public interface SourceService extends IService<TSource> {
     /**
      * 获取有效的菜单集合
      *
+     * @param merchantId 商户ID
      * @return
      */
     List<TSource> getAvailableSources(Integer merchantId);
@@ -26,6 +27,7 @@ public interface SourceService extends IService<TSource> {
     /**
      * 获取菜单的属性结构
      *
+     * @param merchantId 商户ID
      * @return
      */
     List<TreeNode> getSourceTree(Integer merchantId);
@@ -44,6 +46,7 @@ public interface SourceService extends IService<TSource> {
      * @param  merchantId 商户ID
      * @param  accountId 账号ID
      * @throws BusinessCheckException
+     * @return
      */
     List<TSource> getMenuListByUserId(Integer merchantId, Integer accountId) throws BusinessCheckException;
 

+ 4 - 2
fuint-application/src/main/java/com/fuint/common/service/StaffService.java

@@ -5,8 +5,6 @@ import com.fuint.framework.exception.BusinessCheckException;
 import com.fuint.framework.pagination.PaginationRequest;
 import com.fuint.framework.pagination.PaginationResponse;
 import com.fuint.repository.model.MtStaff;
-import com.fuint.repository.model.MtStore;
-
 import java.util.List;
 import java.util.Map;
 
@@ -47,11 +45,15 @@ public interface StaffService extends IService<MtStaff> {
      *
      * @param  id
      * @throws BusinessCheckException
+     * @return
      */
     Integer updateAuditedStatus(Integer id, String statusEnum) throws BusinessCheckException;
 
     /**
      * 根据条件搜索员工
+     *
+     * @param params 请求参数
+     * @return
      * */
     List<MtStaff> queryStaffByParams(Map<String, Object> params) throws BusinessCheckException;
 

+ 0 - 1
fuint-application/src/main/java/com/fuint/common/service/StockService.java

@@ -7,7 +7,6 @@ import com.fuint.framework.pagination.PaginationResponse;
 import com.fuint.framework.web.ResponseObject;
 import com.fuint.repository.model.MtStock;
 import com.fuint.repository.model.MtStockItem;
-
 import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;

+ 7 - 9
fuint-application/src/main/java/com/fuint/common/service/StoreService.java

@@ -37,6 +37,7 @@ public interface StoreService extends IService<MtStore> {
      * 获取系统默认店铺
      *
      * @throws BusinessCheckException
+     * @return
      */
     MtStore getDefaultStore(String merchantNo) throws BusinessCheckException;
 
@@ -45,17 +46,10 @@ public interface StoreService extends IService<MtStore> {
      *
      * @param  id 店铺ID
      * @throws BusinessCheckException
+     * @return
      */
     MtStore queryStoreById(Integer id) throws BusinessCheckException;
 
-    /**
-     * 根据店铺id列表获取店铺信息
-     *
-     * @param  ids 店铺ID列表
-     * @throws BusinessCheckException
-     */
-    List<MtStore> queryStoresByIds(List<Integer> ids) throws BusinessCheckException;
-
     /**
      * 根据店铺名称获取店铺信息
      *
@@ -84,7 +78,10 @@ public interface StoreService extends IService<MtStore> {
     void updateStatus(Integer id, String operator, String status) throws BusinessCheckException;
 
     /**
-     * 根据条件查询店铺
+     * 根据条件查询店铺列表
+     *
+     * @param params 查询参数
+     * @return
      * */
     List<MtStore> queryStoresByParams(Map<String, Object> params) throws BusinessCheckException;
 
@@ -98,4 +95,5 @@ public interface StoreService extends IService<MtStore> {
      * @return
      * */
     List<MtStore> queryByDistance(String merchantNo, String keyword, String latitude, String longitude) throws BusinessCheckException;
+
 }

+ 3 - 3
fuint-application/src/main/java/com/fuint/common/service/UserActionService.java

@@ -31,9 +31,9 @@ public interface UserActionService extends IService<MtUserAction> {
     boolean addUserAction(MtUserAction mtUserAction) throws BusinessCheckException;
 
     /**
-     * 根据ID获取Banner信息
+     * 根据ID获取会员行为详情
      *
-     * @param id Banner ID
+     * @param  id ID
      * @throws BusinessCheckException
      */
     MtUserAction getUserActionDetail(Integer id) throws BusinessCheckException;
@@ -41,7 +41,7 @@ public interface UserActionService extends IService<MtUserAction> {
     /**
      * 根据ID删除会员行为
      *
-     * @param id       ID
+     * @param id ID
      * @param operator 操作人
      * @throws BusinessCheckException
      */

+ 10 - 3
fuint-application/src/main/java/com/fuint/common/service/UserCouponService.java

@@ -8,12 +8,11 @@ import com.fuint.framework.pagination.PaginationRequest;
 import com.fuint.framework.pagination.PaginationResponse;
 import com.fuint.framework.web.ResponseObject;
 import com.fuint.repository.model.MtUserCoupon;
-
 import java.util.List;
 import java.util.Map;
 
 /**
- * 用户卡券业务接口
+ * 会员卡券业务接口
  *
  * Created by FSQ
  * CopyRight https://www.fuint.cn
@@ -30,13 +29,15 @@ public interface UserCouponService extends IService<MtUserCoupon> {
 
     /**
      * 领取卡券
+     *
      * @param couponReceiveParam
      * @return
      * */
     boolean receiveCoupon(CouponReceiveParam couponReceiveParam) throws BusinessCheckException;
 
     /**
-     * 预存
+     * 预存卡券
+     *
      * @param paramMap
      * @return
      * */
@@ -59,6 +60,7 @@ public interface UserCouponService extends IService<MtUserCoupon> {
 
     /**
      * 获取会员可支付用的卡券
+     *
      * @param userId
      * @param type
      * @return
@@ -74,12 +76,15 @@ public interface UserCouponService extends IService<MtUserCoupon> {
 
     /**
      * 获取会员卡券详情
+     *
      * @param userCouponId
+     * @return
      * */
     MtUserCoupon getUserCouponDetail(Integer userCouponId) throws BusinessCheckException;
 
     /**
      * 根据过期时间查询会员卡券
+     *
      * @param userId
      * @param status
      * @param startTime
@@ -90,10 +95,12 @@ public interface UserCouponService extends IService<MtUserCoupon> {
 
     /**
      * 给会员发送卡券(会员购买)
+     *
      * @param orderId
      * @param couponId
      * @param userId
      * @param mobile
+     * @return
      * */
     boolean buyCouponItem(Integer orderId, Integer couponId, Integer userId, String mobile) throws BusinessCheckException;
 }

+ 6 - 0
fuint-application/src/main/java/com/fuint/common/service/UserGradeService.java

@@ -29,6 +29,7 @@ public interface UserGradeService extends IService<MtUserGrade> {
      *
      * @param  reqDto
      * @throws BusinessCheckException
+     * @return
      */
     MtUserGrade addUserGrade(MtUserGrade reqDto) throws BusinessCheckException;
 
@@ -37,6 +38,7 @@ public interface UserGradeService extends IService<MtUserGrade> {
      *
      * @param  reqDto
      * @throws BusinessCheckException
+     * @return
      */
     MtUserGrade updateUserGrade(MtUserGrade reqDto) throws BusinessCheckException;
 
@@ -47,6 +49,7 @@ public interface UserGradeService extends IService<MtUserGrade> {
      * @param gradeId ID
      * @param userId
      * @throws BusinessCheckException
+     * @return
      */
     MtUserGrade queryUserGradeById(Integer merchantId, Integer gradeId, Integer userId) throws BusinessCheckException;
 
@@ -56,6 +59,7 @@ public interface UserGradeService extends IService<MtUserGrade> {
      * @param  id      ID
      * @param  operator 操作人
      * @throws BusinessCheckException
+     * @return
      */
     Integer deleteUserGrade(Integer id, String operator) throws BusinessCheckException;
 
@@ -64,6 +68,7 @@ public interface UserGradeService extends IService<MtUserGrade> {
      *
      * @param merchantId
      * @throws BusinessCheckException
+     * @return
      */
     MtUserGrade getInitUserGrade(Integer merchantId) throws BusinessCheckException;
 
@@ -73,6 +78,7 @@ public interface UserGradeService extends IService<MtUserGrade> {
      * @param  merchantId
      * @param  userInfo
      * @throws BusinessCheckException
+     * @return
      * */
     List<MtUserGrade> getPayUserGradeList(Integer merchantId, MtUser userInfo) throws BusinessCheckException;
 }

+ 8 - 3
fuint-application/src/main/java/com/fuint/common/service/VerifyCodeService.java

@@ -5,19 +5,21 @@ import com.fuint.framework.exception.BusinessCheckException;
 import com.fuint.repository.model.MtVerifyCode;
 
 /**
- * 验证码接口
+ * 图形验证码接口
  *
  * Created by FSQ
  * CopyRight https://www.fuint.cn
  */
 public interface VerifyCodeService extends IService<MtVerifyCode> {
+
     /**
-     * 添加验证码
+     * 新增验证码
      *
      * @param mobile
      * @param verifyCode
      * @param expireSecond 间隔秒数
      * @throws BusinessCheckException
+     * @return
      */
     MtVerifyCode addVerifyCode(String mobile, String verifyCode, Integer expireSecond) throws BusinessCheckException;
 
@@ -27,6 +29,7 @@ public interface VerifyCodeService extends IService<MtVerifyCode> {
      * @param mobile 电话号码
      * @param verifyCode 验证码
      * @throws BusinessCheckException
+     * @return
      */
     MtVerifyCode checkVerifyCode(String mobile, String verifyCode) throws BusinessCheckException;
 
@@ -34,7 +37,9 @@ public interface VerifyCodeService extends IService<MtVerifyCode> {
      * 更改验证码状态
      *
      * @param id
+     * @param validFlag
      * @throws BusinessCheckException
+     * @return
      */
     MtVerifyCode updateValidFlag(Long id, String validFlag) throws BusinessCheckException;
-   }
+}

+ 14 - 17
fuint-application/src/main/java/com/fuint/common/service/impl/StoreServiceImpl.java

@@ -238,22 +238,12 @@ public class StoreServiceImpl extends ServiceImpl<MtStoreMapper, MtStore> implem
         }
     }
 
-    /**
-     * 根据店铺id列表获取店铺信息
-     *
-     * @param  ids 店铺ID列表
-     * @throws BusinessCheckException
-     */
-    @Override
-    public List<MtStore> queryStoresByIds(List<Integer> ids) {
-        return mtStoreMapper.findStoresByIds(ids);
-    }
-
     /**
      * 根据店铺名称获取店铺信息
      *
      * @param  storeName 店铺名称
      * @throws BusinessCheckException
+     * @return
      */
     @Override
     public StoreDto queryStoreByName(String storeName) {
@@ -271,9 +261,9 @@ public class StoreServiceImpl extends ServiceImpl<MtStoreMapper, MtStore> implem
     /**
      * 根据店铺ID获取店铺信息
      *
-     * @param id 店铺ID
-     * @return
+     * @param  id 店铺ID
      * @throws BusinessCheckException
+     * @return
      */
     @Override
     public StoreDto queryStoreDtoById(Integer id) throws BusinessCheckException {
@@ -300,6 +290,7 @@ public class StoreServiceImpl extends ServiceImpl<MtStoreMapper, MtStore> implem
      * @param  operator 操作人
      * @param  status   状态
      * @throws BusinessCheckException
+     * @return
      */
     @Override
     @Transactional(rollbackFor = Exception.class)
@@ -317,6 +308,12 @@ public class StoreServiceImpl extends ServiceImpl<MtStoreMapper, MtStore> implem
         mtStoreMapper.updateById(mtStore);
     }
 
+    /**
+     * 根据条件查询店铺列表
+     *
+     * @param params 查询参数
+     * @return
+     * */
     @Override
     public List<MtStore> queryStoresByParams(Map<String, Object> params) {
         LambdaQueryWrapper<MtStore> lambdaQueryWrapper = Wrappers.lambdaQuery();
@@ -349,10 +346,10 @@ public class StoreServiceImpl extends ServiceImpl<MtStoreMapper, MtStore> implem
     /**
      * 根据距离远近获取店铺列表
      *
-     * @param merchantNo
-     * @param keyword
-     * @param latitude
-     * @param longitude
+     * @param merchantNo 商户号
+     * @param keyword 关键字
+     * @param latitude 维度
+     * @param longitude 经度
      * @return
      * */
     @Override