Ver Fonte

fixed 规范注释

fushengqian há 1 ano atrás
pai
commit
ae268a26a1

+ 22 - 11
fuint-application/src/main/java/com/fuint/common/service/impl/CouponServiceImpl.java

@@ -152,8 +152,9 @@ public class CouponServiceImpl extends ServiceImpl<MtCouponMapper, MtCoupon> imp
     /**
      * 保存卡券信息
      *
-     * @param  reqCouponDto
+     * @param  reqCouponDto 卡券实体
      * @throws BusinessCheckException
+     * @return
      */
     @Override
     @Transactional(rollbackFor = Exception.class)
@@ -380,7 +381,7 @@ public class CouponServiceImpl extends ServiceImpl<MtCouponMapper, MtCoupon> imp
      * 根据ID获取券信息
      *
      * @param id 券ID
-     * @throws BusinessCheckException
+     * @return
      */
     @Override
     public MtCoupon queryCouponById(Integer id) {
@@ -390,17 +391,18 @@ public class CouponServiceImpl extends ServiceImpl<MtCouponMapper, MtCoupon> imp
     /**
      * 删除卡券
      *
-     * @param  id       券ID
+     * @param  id 券ID
      * @param  operator 操作人
      * @throws BusinessCheckException
+     * @return
      */
     @Override
     @OperationServiceLog(description = "删除卡券")
     @Transactional(rollbackFor = Exception.class)
-    public void deleteCoupon(Long id, String operator) {
+    public void deleteCoupon(Long id, String operator) throws BusinessCheckException {
         MtCoupon couponInfo = queryCouponById(id.intValue());
         if (null == couponInfo) {
-            return;
+            throw new BusinessCheckException("卡券不存在");
         }
         couponInfo.setStatus(StatusEnum.DISABLE.getKey());
         // 修改时间
@@ -412,7 +414,9 @@ public class CouponServiceImpl extends ServiceImpl<MtCouponMapper, MtCoupon> imp
 
     /**
      * 获取卡券列表
-     * @param couponListParam
+     *
+     * @param couponListParam 查询参数
+     * @return
      * */
     @Override
     @Transactional(rollbackFor = Exception.class)
@@ -542,8 +546,9 @@ public class CouponServiceImpl extends ServiceImpl<MtCouponMapper, MtCoupon> imp
 
     /**
      * 根据分组ID获取卡券列表
+     *
      * @param groupId 查询参数
-     * @throws BusinessCheckException
+     * @return
      * */
     public List<MtCoupon> queryCouponListByGroupId(Integer groupId) {
         List<MtCoupon> couponList = mtCouponMapper.queryByGroupId(groupId.intValue());
@@ -560,6 +565,7 @@ public class CouponServiceImpl extends ServiceImpl<MtCouponMapper, MtCoupon> imp
      * @param  uuid 批次号
      * @param  operator 操作人
      * @throws BusinessCheckException
+     * @return
      */
     @Override
     @Transactional(rollbackFor = Exception.class)
@@ -700,6 +706,7 @@ public class CouponServiceImpl extends ServiceImpl<MtCouponMapper, MtCoupon> imp
      * @param uuid     批次号
      * @param operator 操作人
      * @throws BusinessCheckException
+     * @return
      */
     @Override
     @Transactional(rollbackFor = Exception.class)
@@ -728,6 +735,7 @@ public class CouponServiceImpl extends ServiceImpl<MtCouponMapper, MtCoupon> imp
      * @param amount 核销金额
      * @param remark 核销备注
      * @throws BusinessCheckException
+     * @return
      */
     @Override
     @Transactional(rollbackFor = Exception.class)
@@ -897,9 +905,10 @@ public class CouponServiceImpl extends ServiceImpl<MtCouponMapper, MtCoupon> imp
     /**
      * 根据券ID删除会员卡券
      *
-     * @param  id       券ID
+     * @param  id 券ID
      * @param  operator 操作人
      * @throws BusinessCheckException
+     * @return
      */
     @Override
     @OperationServiceLog(description = "删除会员卡券")
@@ -934,6 +943,7 @@ public class CouponServiceImpl extends ServiceImpl<MtCouponMapper, MtCoupon> imp
      * @param userCouponId   用户卡券ID
      * @param operator       操作人
      * @throws BusinessCheckException
+     * @return
      */
     @Override
     @Transactional(rollbackFor = Exception.class)
@@ -1005,6 +1015,7 @@ public class CouponServiceImpl extends ServiceImpl<MtCouponMapper, MtCoupon> imp
      * 根据ID获取用户卡券信息
      * @param  userCouponId 查询参数
      * @throws BusinessCheckException
+     * @return
      * */
     @Override
     public MtUserCoupon queryUserCouponById(Integer userCouponId) {
@@ -1054,7 +1065,7 @@ public class CouponServiceImpl extends ServiceImpl<MtCouponMapper, MtCoupon> imp
     /**
      * 判断卡券码是否过期
      * @param code 12位券码
-     * @throws BusinessCheckException
+     * @return
      * */
     @Override
     public boolean codeExpired(String code) {
@@ -1081,9 +1092,9 @@ public class CouponServiceImpl extends ServiceImpl<MtCouponMapper, MtCoupon> imp
 
     /**
      * 判断卡券是否过期
-     * @param coupon
-     * @param userCoupon
      *
+     * @param coupon 卡券信息
+     * @param userCoupon 会员卡券信息
      * @return
      * */
     @Override

+ 2 - 1
fuint-application/src/main/java/com/fuint/common/service/impl/OpenGiftServiceImpl.java

@@ -318,7 +318,8 @@ public class OpenGiftServiceImpl extends ServiceImpl<MtOpenGiftMapper, MtOpenGif
     /**
      * 赠礼详情
      *
-     * @param  openGiftInfo
+     * @param  openGiftInfo 赠礼详情
+     * @throws BusinessCheckException
      * @return OpenGiftDto
      * */
     private OpenGiftDto dealDetail(MtOpenGift openGiftInfo) throws BusinessCheckException {

+ 5 - 4
fuint-application/src/main/java/com/fuint/common/service/impl/StoreServiceImpl.java

@@ -111,8 +111,9 @@ public class StoreServiceImpl extends ServiceImpl<MtStoreMapper, MtStore> implem
     /**
      * 保存店铺信息
      *
-     * @param  storeDto
+     * @param  storeDto 店铺信息
      * @throws BusinessCheckException
+     * @return
      */
     @Override
     @Transactional(rollbackFor = Exception.class)
@@ -197,6 +198,7 @@ public class StoreServiceImpl extends ServiceImpl<MtStoreMapper, MtStore> implem
      *
      * @param  id 店铺ID
      * @throws BusinessCheckException
+     * @return
      */
     @Override
     public MtStore queryStoreById(Integer id) {
@@ -209,8 +211,8 @@ public class StoreServiceImpl extends ServiceImpl<MtStoreMapper, MtStore> implem
     /**
      * 获取系统默认店铺
      *
-     * @param  merchantNo
-     * @throws BusinessCheckException
+     * @param  merchantNo 商户号
+     * @return
      */
     @Override
     public MtStore getDefaultStore(String merchantNo) {
@@ -242,7 +244,6 @@ public class StoreServiceImpl extends ServiceImpl<MtStoreMapper, MtStore> implem
      * 根据店铺名称获取店铺信息
      *
      * @param  storeName 店铺名称
-     * @throws BusinessCheckException
      * @return
      */
     @Override

+ 4 - 1
fuint-application/src/main/java/com/fuint/common/service/impl/UserActionServiceImpl.java

@@ -78,7 +78,8 @@ public class UserActionServiceImpl extends ServiceImpl<MtUserActionMapper, MtUse
     /**
      * 新增会员行为
      *
-     * @param  reqUserAction
+     * @param  reqUserAction 会员行为
+     * @return
      */
     @Override
     public boolean addUserAction(MtUserAction reqUserAction) {
@@ -118,6 +119,7 @@ public class UserActionServiceImpl extends ServiceImpl<MtUserActionMapper, MtUse
      * 根据ID获取信息
      *
      * @param id
+     * @return
      */
     @Override
     public MtUserAction getUserActionDetail(Integer id) {
@@ -129,6 +131,7 @@ public class UserActionServiceImpl extends ServiceImpl<MtUserActionMapper, MtUse
      *
      * @param id
      * @param operator 操作人
+     * @return
      */
     @Override
     public void deleteUserAction(Integer id, String operator) {

+ 30 - 18
fuint-application/src/main/java/com/fuint/common/service/impl/UserCouponServiceImpl.java

@@ -135,7 +135,8 @@ public class UserCouponServiceImpl extends ServiceImpl<MtUserCouponMapper, MtUse
 
     /**
      * 领取卡券(优惠券、计次卡)
-     * @param receiveParam
+     *
+     * @param receiveParam 领取参数
      * @return
      * */
     @Override
@@ -285,7 +286,8 @@ public class UserCouponServiceImpl extends ServiceImpl<MtUserCouponMapper, MtUse
 
     /**
      * 储值卡券
-     * @param paramMap
+     *
+     * @param paramMap 储值参数
      * @return
      * */
     public boolean preStore(Map<String, Object> paramMap) throws BusinessCheckException {
@@ -331,8 +333,9 @@ public class UserCouponServiceImpl extends ServiceImpl<MtUserCouponMapper, MtUse
 
     /**
      * 获取会员卡券列表
-     * @param userId
-     * @param status
+     *
+     * @param userId 会员ID
+     * @param status 状态
      * @return
      * */
     @Override
@@ -342,8 +345,10 @@ public class UserCouponServiceImpl extends ServiceImpl<MtUserCouponMapper, MtUse
 
     /**
      * 获取会员卡券列表
+     *
      * @param paramMap
      * @throws BusinessCheckException
+     * @return
      * */
     @Override
     @Transactional(rollbackFor = Exception.class)
@@ -518,7 +523,9 @@ public class UserCouponServiceImpl extends ServiceImpl<MtUserCouponMapper, MtUse
 
     /**
      * 获取会员可支付使用的卡券
-     * @param userId
+     *
+     * @param userId 会员ID
+     * @param useFor 用途
      * @return
      * */
     @Override
@@ -567,8 +574,9 @@ public class UserCouponServiceImpl extends ServiceImpl<MtUserCouponMapper, MtUse
 
     /**
      * 获取会员卡券详情
-     * @param userId
-     * @param couponId
+     *
+     * @param userId 会员ID
+     * @param couponId 卡券ID
      * @return
      * */
     @Override
@@ -578,7 +586,8 @@ public class UserCouponServiceImpl extends ServiceImpl<MtUserCouponMapper, MtUse
 
     /**
      * 获取会员卡券详情
-     * @param userCouponId
+     *
+     * @param userCouponId 会员卡券ID
      * @return
      * */
     @Override
@@ -589,10 +598,11 @@ public class UserCouponServiceImpl extends ServiceImpl<MtUserCouponMapper, MtUse
 
     /**
      * 根据过期时间查询会员卡券
-     * @param userId
-     * @param status
-     * @param startTime
-     * @param endTime
+     *
+     * @param userId 会员ID
+     * @param status 状态
+     * @param startTime 开始时间
+     * @param endTime 结束时间
      * @return
      * */
     @Override
@@ -603,10 +613,11 @@ public class UserCouponServiceImpl extends ServiceImpl<MtUserCouponMapper, MtUse
 
     /**
      * 会员发送卡券
-     * @param orderId
-     * @param couponId
-     * @param userId
-     * @param mobile
+     *
+     * @param orderId 订单ID
+     * @param couponId 卡券ID
+     * @param userId 会员ID
+     * @param mobile 手机号
      * @return
      * */
     public boolean buyCouponItem(Integer orderId, Integer couponId, Integer userId, String mobile) throws BusinessCheckException {
@@ -672,8 +683,9 @@ public class UserCouponServiceImpl extends ServiceImpl<MtUserCouponMapper, MtUse
 
     /**
      * 预存单张
-     * @param couponInfo
-     * @param userInfo
+     *
+     * @param couponInfo 卡券信息
+     * @param userInfo 会员信息
      * @return
      * */
     private boolean preStoreItem(MtCoupon couponInfo, MtUser userInfo, Integer orderId, BigDecimal amount) {

+ 26 - 0
fuint-application/src/main/java/com/fuint/common/util/CommonUtil.java

@@ -64,6 +64,9 @@ public class CommonUtil {
 
     /**
      * 判断是否数字
+     *
+     * @param str 字符串
+     * @return
      * */
     public static boolean isNumeric(String str) {
         if (StringUtil.isEmpty(str)) {
@@ -82,6 +85,8 @@ public class CommonUtil {
 
     /**
      * 生成随机会员号(13位数)
+     *
+     * @return
      * */
     public static String createUserNo() {
         StringBuilder sb = new StringBuilder("8");
@@ -93,6 +98,8 @@ public class CommonUtil {
 
     /**
      * 生成随机键值号
+     *
+     * @return
      * */
     public static String createAccountKey() {
         StringBuilder sb = new StringBuilder("11");
@@ -104,6 +111,8 @@ public class CommonUtil {
 
     /**
      * 生成随机商户号
+     *
+     * @return
      * */
     public static String createMerchantNo() {
         StringBuilder sb = new StringBuilder("8");
@@ -114,6 +123,8 @@ public class CommonUtil {
 
     /**
      * 生成随机结算单号(13位数)
+     *
+     * @return
      * */
     public static String createSettlementNo() {
         StringBuilder sb = new StringBuilder("8");
@@ -125,7 +136,9 @@ public class CommonUtil {
 
     /**
      * 生成随机订单号
+     *
      * @param userId
+     * @return
      * */
     public static String createOrderSN(String userId) {
         // 时间是17位
@@ -213,6 +226,13 @@ public class CommonUtil {
         return false;
     }
 
+    /**
+     * 保存上传文件
+     *
+     * @param file 上传的文件
+     * @param filePath 文件路径
+     * @return
+     * */
     public static void saveMultipartFile(MultipartFile file, String filePath) {
         if (file != null && !file.isEmpty()) {
             try {
@@ -386,6 +406,12 @@ public class CommonUtil {
         return filter(value);
     }
 
+    /**
+     * 判断是否emo表情
+     *
+     * @param first 字符串
+     * @return
+     * */
     public static boolean isEmojiCharacter(char first) {
         return !
                 ((first == 0x0) ||