Merge remote-tracking branch 'origin/master'
| | |
| | | package com.doumee.core.utils; |
| | | |
| | | import cn.binarywang.wx.miniapp.bean.WxMaCodeLineColor; |
| | | import com.doumee.core.wx.WxMiniConfig; |
| | | import com.doumee.dao.business.model.Areas; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.collections4.CollectionUtils; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | |
| | | import java.io.ByteArrayInputStream; |
| | | import java.io.InputStream; |
| | | import java.math.BigDecimal; |
| | | import java.net.URLDecoder; |
| | | import java.util.*; |
| | | import java.util.regex.Matcher; |
| | | import java.util.regex.Pattern; |
| | | |
| | | @Slf4j |
| | | public class Constants { |
| | | |
| | | public static final String[] ALL_SPELL_LIST_FIRST = new String[]{"A", "B", "C", "D", "E", "F", "G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"}; |
| | |
| | | public static final String COFFEE_ARTICLE_BACKGROUND = "COFFEE_ARTICLE_BACKGROUND"; |
| | | |
| | | public static final String TRANSFER_FILE = "TRANSFER_FILE"; |
| | | |
| | | public static final String INVITE_RULE = "INVITE_RULE"; |
| | | |
| | | public static final String INVITE_IMG = "INVITE_IMG"; |
| | | |
| | | public static final String SHARES_FILE = "SHARES_FILE"; |
| | | |
| | | public static final String INVITE_IMG_URL = "INVITE_IMG_URL"; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | public interface RedisKeys { |
| | |
| | | this.info = info; |
| | | } |
| | | } |
| | | |
| | | |
| | | public static InputStream generateWxMiniImgStream(String scene, String page, boolean isUsePage) { |
| | | //çæå¾çä¸ä¼ OSS |
| | | Map<String,Object> body = new HashMap<>(); |
| | | // åºæ¯ç ï¼ä¸å端约å®ï¼æç»æ¯éè¦å端解æ |
| | | body.put("scene", scene); |
| | | // æ£å¼ç为 "release"ï¼ä½éªç为 "trial"ï¼å¼åç为 "develop"ãé»è®¤æ¯æ£å¼çã |
| | | String env_version = "release"; |
| | | body.put("env_version", env_version); |
| | | if(isUsePage){ |
| | | body.put("page", page); |
| | | } |
| | | //body.put("page", "pages/index/index"); |
| | | // éæï¼æ ¹æ®ä½ çåºæ¯èªè¡è®¾ç½®bodyåæ° |
| | | body.put("is_hyaline", true); |
| | | try { |
| | | WxMaCodeLineColor codeLineColor = new WxMaCodeLineColor("0","0","0"); |
| | | byte[] bytes = WxMiniConfig.wxMaService.getQrcodeService().createWxaCodeUnlimitBytes |
| | | (scene,null,false,env_version,300,false,codeLineColor,false); |
| | | if (bytes !=null) { |
| | | InputStream inputStream = new ByteArrayInputStream(bytes); |
| | | /* ByteArrayOutputStream baos = new ByteArrayOutputStream(); |
| | | byte[] buffer = new byte[1024]; |
| | | int len = -1; |
| | | while ((len = inputStream.read(buffer)) != -1) { |
| | | baos.write(buffer, 0, len); |
| | | } |
| | | System.out.println("data:mediatype;base64," + Base64.getEncoder().encodeToString(baos.toByteArray()));*/ |
| | | log.error("çæå°ç¨åºç æå:============"+inputStream.available()); |
| | | return inputStream; |
| | | }else{ |
| | | log.error("çæå°ç¨åºç 失败:============"); |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | log.error("çæå°ç¨åºç 失败:============"+e.getMessage()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | |
| | | public static Integer getInviteCode(String inviteStr){ |
| | | if(StringUtils.isNotBlank(inviteStr)&&inviteStr.startsWith("m_")){ |
| | | return Integer.valueOf(inviteStr.replace("m_","")); |
| | | } |
| | | return null; |
| | | } |
| | | } |
| | |
| | | package com.doumee.core.utils; |
| | | |
| | | import com.google.zxing.common.BitMatrix; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import net.coobird.thumbnailator.Thumbnails; |
| | | import org.apache.commons.fileupload.FileItem; |
| | | import org.apache.commons.fileupload.FileItemFactory; |
| | | import org.apache.commons.fileupload.disk.DiskFileItemFactory; |
| | |
| | | import javax.imageio.stream.ImageOutputStream; |
| | | import java.awt.*; |
| | | import java.awt.geom.Ellipse2D; |
| | | import java.awt.geom.RoundRectangle2D; |
| | | import java.awt.image.BufferedImage; |
| | | import java.io.*; |
| | | import java.math.BigDecimal; |
| | | import java.math.RoundingMode; |
| | | import java.net.URL; |
| | | |
| | | @Slf4j |
| | | public class GeneratePicUtil { |
| | | |
| | | static String bg="https://shoeslxkj.oss-cn-beijing.aliyuncs.com/file/20230404/SysBaseBackGround/D56231512C0B4A4C9D06B02F9566B0B0.png"; |
| | |
| | | return resMatrix; |
| | | } |
| | | |
| | | public static BufferedImage getImgIO(String imgurl) { |
| | | try { |
| | | return ImageIO.read(new URL(imgurl)); |
| | | }catch (Exception e){ |
| | | log.error("æµ·æ¥==>æåå¾çæ¥éï¼"+e.getMessage()); |
| | | }return null; |
| | | } |
| | | |
| | | private static BufferedImage getImgIO(InputStream is) { |
| | | if(is ==null){ |
| | | log.error("=============================qrcode error å°ç¨åºç 为空"); |
| | | }else{ |
| | | |
| | | log.error("=============================qrcode okay å°ç¨åºç æææ¸æ"); |
| | | } |
| | | try { |
| | | return ImageIO.read(is); |
| | | }catch (Exception e){ |
| | | log.error("=============================qrcode error å°ç¨åºç 为空11111111111:"+e.getMessage()); |
| | | |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public static int th = 30; |
| | | public static InputStream generateShareWithUserImg(BufferedImage imgurl, InputStream mpCode) throws IOException { |
| | | int w = imgurl.getWidth(); |
| | | int h = imgurl.getHeight(); |
| | | double rate = (double)w/750d; |
| | | |
| | | //å¾å°å®çç»å¶ç¯å¢(è¿å¼ å¾ççç¬) |
| | | Graphics2D g2 = (Graphics2D) imgurl.getGraphics(); |
| | | g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); |
| | | g2.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR); |
| | | //èæ¯å¾ç |
| | | g2.setColor(Color.white); |
| | | Font font =new Font("é»ä½", Font.PLAIN, (int)(24 * rate)); |
| | | g2.setFont(font); |
| | | FontMetrics fontMetrics = g2.getFontMetrics(font); |
| | | int textWidth = fontMetrics.stringWidth("æ«ç çæ´å¤"); |
| | | g2.drawString("æ«ç çæ´å¤", (int)(w -(textWidth+20*rate)),h-(int)(rate*(50-th))); |
| | | |
| | | BufferedImage img3 = getImgIO(mpCode); |
| | | if(img3!=null){ |
| | | g2.setColor(Color.white); |
| | | g2.fillOval((int)(w-130*rate), (int)(h-rate*150), (int)(100*rate) , (int)(100*rate)); |
| | | g2.drawImage(img3, (int)(w-130*rate), (int)(h-rate*150), (int)(100*rate) , (int)(100*rate), null); |
| | | } |
| | | InputStream inputStream = bufferedImageToInputStream(imgurl); |
| | | return inputStream; |
| | | } |
| | | |
| | | /** |
| | | * å¾ç设置åè§ |
| | | * @param srcImage |
| | | * @return |
| | | * @throws |
| | | */ |
| | | public static BufferedImage setRadius(BufferedImage srcImage, int radius, int border, int padding){ |
| | | int width = srcImage.getWidth(); |
| | | int height = srcImage.getHeight(); |
| | | int canvasWidth = width + padding * 2; |
| | | int canvasHeight = height + padding * 2; |
| | | |
| | | BufferedImage image = new BufferedImage(canvasWidth, canvasHeight, BufferedImage.TYPE_INT_ARGB); |
| | | Graphics2D gs = image.createGraphics(); |
| | | gs.setComposite(AlphaComposite.Src); |
| | | gs.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); |
| | | gs.setColor(Color.WHITE); |
| | | gs.fill(new RoundRectangle2D.Float(0, 0, canvasWidth, canvasHeight, radius, radius)); |
| | | gs.setComposite(AlphaComposite.SrcAtop); |
| | | gs.drawImage(setClip(srcImage, radius), padding, padding, null); |
| | | if(border !=0){ |
| | | gs.setColor(Color.white); |
| | | gs.setStroke(new BasicStroke(border)); |
| | | gs.drawRoundRect(padding, padding, canvasWidth - 2 * padding, canvasHeight - 2 * padding, radius, radius); |
| | | } |
| | | gs.dispose(); |
| | | return image; |
| | | } |
| | | |
| | | /** |
| | | * å¾çååè§ |
| | | * @param srcImage |
| | | * @param radius |
| | | * @return |
| | | */ |
| | | public static BufferedImage setClip(BufferedImage srcImage, int radius){ |
| | | int width = srcImage.getWidth(); |
| | | int height = srcImage.getHeight(); |
| | | BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB); |
| | | Graphics2D gs = image.createGraphics(); |
| | | |
| | | gs.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); |
| | | gs.setClip(new RoundRectangle2D.Double(0, 0, width, height, radius, radius)); |
| | | gs.drawImage(srcImage, 0, 0, null); |
| | | gs.dispose(); |
| | | return image; |
| | | } |
| | | |
| | | public static BufferedImage transfromToImage(String imgUrl,String suffix){ |
| | | BufferedImage originalImage = null; |
| | | try { |
| | | originalImage = ImageIO.read(new URL(imgUrl)); |
| | | } catch (IOException e) { |
| | | log.error("æµ·æ¥==>æåå¾çæ¥éï¼"+e.getMessage()); |
| | | return null; |
| | | } |
| | | ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); |
| | | try { |
| | | Thumbnails.of(originalImage) |
| | | .scale(1) |
| | | .outputFormat("png".equals(suffix.toLowerCase())?"PNG":"JPEG") |
| | | .outputQuality(0.8) |
| | | .imageType(BufferedImage.TYPE_INT_RGB) |
| | | .toOutputStream(outputStream); |
| | | } catch (IOException e) { |
| | | log.error("æµ·æ¥==>å缩å¾çæ¥éï¼"+e.getMessage()); |
| | | return null; |
| | | } |
| | | byte[] data = outputStream.toByteArray(); |
| | | // 2. å
è£
为è¾å
¥æµ |
| | | ByteArrayInputStream bis = new ByteArrayInputStream(data); |
| | | // 3. è§£ç 为 BufferedImage |
| | | try { |
| | | return ImageIO.read(bis); |
| | | } catch (IOException e) { |
| | | log.error("æµ·æ¥==>è½¬æµæ¥éï¼"+e.getMessage()); |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.core.utils; |
| | | |
| | | import org.jsoup.Jsoup; |
| | | |
| | | /** |
| | | * Created by IntelliJ IDEA. |
| | | * |
| | | * @Author : Rk |
| | | * @create 2026/1/20 16:58 |
| | | */ |
| | | public class RichTextProcessor { |
| | | |
| | | /** |
| | | * ä»HTML䏿åçº¯ææ¬ |
| | | */ |
| | | public static String extractPlainTextFromHtml(String htmlContent) { |
| | | if (htmlContent == null || htmlContent.isEmpty()) { |
| | | return ""; |
| | | } |
| | | |
| | | // ç´æ¥æåææ¬å
容ï¼å»é¤ææHTMLæ ç¾ |
| | | return Jsoup.parse(htmlContent).text(); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.doumee.dao.business.model.Collect; |
| | | import com.github.yulichang.base.mapper.MPJJoinMapper; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @date 2023/03/21 15:48 |
| | | */ |
| | | public interface CollectMapper extends BaseMapper<Collect> { |
| | | public interface CollectMapper extends MPJJoinMapper<Collect> { |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.business; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.doumee.dao.business.model.Integral; |
| | | import com.doumee.dao.business.model.InviteRecord; |
| | | import com.github.yulichang.base.mapper.MPJJoinMapper; |
| | | |
| | | /** |
| | | * ç¨æ·éè¯·è®°å½ |
| | | * @author æ±è¹è¹ |
| | | * @date 2026å¹´1æ20æ¥09:32:12 |
| | | */ |
| | | public interface InviteRecordMapper extends MPJJoinMapper<InviteRecord> { |
| | | |
| | | } |
| | |
| | | package com.doumee.dao.business.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | |
| | | @ExcelColumn(name="对象ç¼ç ") |
| | | private Integer objId; |
| | | |
| | | @ApiModelProperty(value = "对象类å 0æ´»å¨æ¢åºå¨è¯¢", example = "1") |
| | | @ApiModelProperty(value = "对象类å 0æ´»å¨æ¢åºå¨è¯¢ 1åå", example = "1") |
| | | @ExcelColumn(name="对象类å 0æ´»å¨æ¢åºå¨è¯¢") |
| | | private Integer objType; |
| | | |
| | |
| | | @ExcelColumn(name="对象å
³èç¨æ·ç¼ç ï¼å
³èmember表ï¼") |
| | | private Integer objMemberId; |
| | | |
| | | @ApiModelProperty(value = "ååå°é¢å¾/æç« å表å¾") |
| | | @TableField(exist = false) |
| | | private String imgUrl; |
| | | |
| | | @ApiModelProperty(value = "åååç§°/æç« åç§°") |
| | | @TableField(exist = false) |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "ååä»·æ ¼") |
| | | @TableField(exist = false) |
| | | private BigDecimal price; |
| | | |
| | | @ApiModelProperty(value = "å线价") |
| | | @TableField(exist = false) |
| | | private BigDecimal linePrice; |
| | | |
| | | @ApiModelProperty(value = "æç« åç±»åç§°") |
| | | @TableField(exist = false) |
| | | private String labelName; |
| | | |
| | | @ApiModelProperty(value = "é
读é") |
| | | @TableField(exist = false) |
| | | private Integer readNum; |
| | | |
| | | @ApiModelProperty(value = "æç« å叿¶é´") |
| | | @TableField(exist = false) |
| | | private Date releaseDate; |
| | | |
| | | @ApiModelProperty(value = "æç« å
容") |
| | | @TableField(exist = false) |
| | | private String content; |
| | | |
| | | |
| | | |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.business.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * ç¨æ·éè¯·è®°å½ |
| | | * @author æ±è¹è¹ |
| | | * @date 2026å¹´1æ20æ¥09:32:12 |
| | | */ |
| | | @Data |
| | | @ApiModel("ç¨æ·é请记å½") |
| | | @TableName("`invite_record`") |
| | | public class InviteRecord { |
| | | |
| | | @ApiModelProperty(value = "主é®", example = "1") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty(value = "å建人ç¼ç ", example = "1") |
| | | private Integer creator; |
| | | |
| | | @ApiModelProperty(value = "å建æ¶é´") |
| | | @ExcelColumn(name="äº¤ææ¶é´" ,index =1,width = 10) |
| | | private Date createDate; |
| | | |
| | | @ApiModelProperty(value = "æ´æ°äººç¼ç ", example = "1") |
| | | private Integer editor; |
| | | |
| | | @ApiModelProperty(value = "æ´æ°æ¶é´") |
| | | |
| | | private Date editDate; |
| | | |
| | | @ApiModelProperty(value = "æ¯å¦å é¤0å¦ 1æ¯", example = "1") |
| | | private Integer isdeleted; |
| | | |
| | | @ApiModelProperty(value = "夿³¨") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty(value = "é请人主é®ï¼å
³èmember表ï¼", example = "1") |
| | | private Integer inviteId; |
| | | |
| | | @ApiModelProperty(value = "被é请人主é®ï¼å
³èmember表ï¼", example = "1") |
| | | private Integer memberId; |
| | | |
| | | @ApiModelProperty(value = "被éè¯·äººææºå·") |
| | | private String phone; |
| | | |
| | | @ApiModelProperty(value = "æ¯å¦å®æé¦åï¼0å¦ 1æ¯", example = "1") |
| | | private Integer firstOrderStatus; |
| | | |
| | | @ApiModelProperty(value = "宿é¦åæ¶é´") |
| | | private Date firstFinishDate; |
| | | |
| | | @ApiModelProperty(value = "é请å¥å±ç§¯å") |
| | | private BigDecimal rewardIntegral; |
| | | |
| | | @ApiModelProperty(value = "宿é¦åå¥å±ç§¯å") |
| | | private BigDecimal firstRewardIntegral; |
| | | |
| | | @ApiModelProperty(value = "被é请人头å") |
| | | @TableField(exist = false) |
| | | private String imgUrl; |
| | | |
| | | @ApiModelProperty(value = "被é请人åç§°") |
| | | @TableField(exist = false) |
| | | private String memberName; |
| | | |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import com.doumee.core.model.LoginUserInfo; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.DateUtil; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import java.util.Date; |
| | | import java.math.BigDecimal; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * ç¨æ·ä¼æ å¸å
³è表 |
| | |
| | | @TableField(exist = false) |
| | | private BigDecimal couponPrice ; |
| | | |
| | | |
| | | public static MemberCoupon couponToBean(Coupon coupon, Member member , Date now, Integer getMethod, LoginUserInfo loginUserInfo){ |
| | | MemberCoupon insert = new MemberCoupon(); |
| | | insert.setCreateDate(now); |
| | | insert.setEditDate(now); |
| | | insert.setCreator(Objects.nonNull(loginUserInfo)?loginUserInfo.getId():null); |
| | | insert.setEditor(Objects.nonNull(loginUserInfo)?loginUserInfo.getId():null); |
| | | insert.setIsdeleted(Constants.ZERO); |
| | | insert.setRemark(Constants.equalsInteger(getMethod, Constants.ZERO)?"注åèµ é":Constants.equalsInteger(getMethod, Constants.ONE)?"é请好å":"å®ååæ¾"); |
| | | insert.setMemberId(member.getId()); |
| | | insert.setShopId(coupon.getShopId()); |
| | | insert.setType(coupon.getType()); |
| | | insert.setCouponType(coupon.getType()); |
| | | insert.setLimitPrice(coupon.getLimitPrice()); |
| | | insert.setPrice(coupon.getPrice()); |
| | | if(Constants.equalsObject(coupon.getUseType(),Constants.ZERO)){ |
| | | //妿æ¯åºå®æ¶æ®µ |
| | | insert.setStartDate(coupon.getStartDate()); |
| | | insert.setEndDate(coupon.getEndDate()); |
| | | }else{ |
| | | //åºå®æ¶é¿ //æ¨è¿å¤©æ° |
| | | insert.setEndDate(DateUtil.addDaysToDate(now,Constants.formatIntegerNum(coupon.getValidDays()))); |
| | | insert.setStartDate(now); |
| | | } |
| | | insert.setGetMethod(getMethod);//注åèµ é |
| | | insert.setIntegral(coupon.getIntegral()); |
| | | insert.setStatus(Constants.ZERO);//æªä½¿ç¨ |
| | | insert.setInfo(coupon.getInfo()); |
| | | insert.setName(coupon.getName()); |
| | | insert.setApplyIds(coupon.getApplyIds()); |
| | | insert.setApplyType(coupon.getApplyType()); |
| | | insert.setCouponId(coupon.getId()); |
| | | return insert; |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | @ApiModelProperty(value = "é请好å积åå¥å±æ°é") |
| | | private BigDecimal shareIntegralReward; |
| | | |
| | | @ApiModelProperty(value = "注å伿 å¸å¥å±éå") |
| | | @ApiModelProperty(value = "注å伿 å¸å¥å±éå") //[{"num":"2","couponId":6},{"num":"3","couponId":5}] |
| | | private List<JSONObject> regCouponRewardList; |
| | | @ApiModelProperty(value = "é请好å伿 å¸å¥å±éå") |
| | | private List<JSONObject> shareCouponRewardList; |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.web.request; |
| | | |
| | | import com.doumee.core.utils.Constants; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | |
| | | /** |
| | | * Created by IntelliJ IDEA. |
| | | * |
| | | * @Author : Rk |
| | | * @create 2023/4/13 16:47 |
| | | */ |
| | | @Data |
| | | @ApiModel("æ¶èä¸å¡ä¿å请æ±ç±»") |
| | | public class CollectSaveRequest { |
| | | |
| | | @ApiModelProperty(value = "ä¸å¡ä¸»é®") |
| | | private Integer objId; |
| | | |
| | | @ApiModelProperty(value = "对象主é®") |
| | | private Integer type; |
| | | |
| | | } |
| | |
| | | private String openid; |
| | | |
| | | @ApiModelProperty(value = "é请ç ") |
| | | private Integer recId; |
| | | private String recId; |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.web.response; |
| | | |
| | | import com.doumee.dao.business.model.InviteRecord; |
| | | import com.doumee.dao.business.model.Member; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * Created by IntelliJ IDEA. |
| | | * |
| | | * @Author : Rk |
| | | * @create 2023/3/23 9:25 |
| | | */ |
| | | @Data |
| | | @ApiModel("é请记å½è¿åä¿¡æ¯") |
| | | public class InviteInfoResponse{ |
| | | |
| | | @ApiModelProperty(value = "é请人æ°") |
| | | private Integer inviteNum; |
| | | |
| | | @ApiModelProperty(value = "éè¯·èµ éç§¯åæ°é") |
| | | private Long num; |
| | | |
| | | @ApiModelProperty(value = "é请è§å") |
| | | private String inviteRule; |
| | | |
| | | @ApiModelProperty(value = "é请记å½") |
| | | private List<InviteRecord> inviteRecordList; |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | @ApiModelProperty(value = "çå®åºå") |
| | | private Integer stock; |
| | | |
| | | @ApiModelProperty(value = "æ¶èç¶æï¼0=æªæ¶èï¼1=å·²æ¶è") |
| | | private Integer collectStatus; |
| | | |
| | | |
| | | |
| | | // @ApiModelProperty(value = "ååæ ç¾") |
| | | // private List<Labels> labelsList; |
| | | |
| | |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.business.model.Collect; |
| | | import com.doumee.dao.web.dto.CollectDTO; |
| | | import com.doumee.dao.web.request.CollectSaveRequest; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | * @return long |
| | | */ |
| | | Map<Integer, CollectDTO> count(List<Integer> objIds); |
| | | |
| | | void saveCollect(CollectSaveRequest request, Integer memberId); |
| | | |
| | | List<Collect> myCollect(Integer memberId,Integer type); |
| | | } |
| | |
| | | * @param goodsId |
| | | * @return |
| | | */ |
| | | GoodsInfoResponse getGoodsInfo(Integer goodsId); |
| | | GoodsInfoResponse getGoodsInfo(Integer goodsId,Integer memberId); |
| | | |
| | | |
| | | /** |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.service.business; |
| | | |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.business.model.Integral; |
| | | import com.doumee.dao.web.dto.IntegralDTO; |
| | | import com.doumee.dao.web.dto.IntegralRecordDTO; |
| | | import com.doumee.dao.web.request.DealIntegralRequest; |
| | | import com.doumee.dao.web.response.IntegralDataResponse; |
| | | import com.doumee.dao.web.response.InviteInfoResponse; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * ç¨æ·éè¯·è®°å½ |
| | | * @author æ±è¹è¹ |
| | | * @date 2026å¹´1æ20æ¥09:32:12 |
| | | */ |
| | | public interface InviteRecordService { |
| | | |
| | | InviteInfoResponse getInviteInfo(Integer memberId); |
| | | |
| | | String createShareImg(Integer memberId) throws Exception; |
| | | } |
| | | |
| | |
| | | * @param code |
| | | * @return |
| | | */ |
| | | AccountResponse wxLogin(String code,Integer recId); |
| | | AccountResponse wxLogin(String code); |
| | | |
| | | |
| | | AccountResponse wxLoginTest( Integer recId); |
| | |
| | | package com.doumee.service.business.impl; |
| | | |
| | | import com.doumee.biz.system.SystemDictDataBiz; |
| | | import com.doumee.core.model.LoginUserInfo; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.RichTextProcessor; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.business.ActivityMapper; |
| | | import com.doumee.dao.business.ArticleMapper; |
| | | import com.doumee.dao.business.CollectMapper; |
| | | import com.doumee.dao.business.model.Collect; |
| | | import com.doumee.dao.business.GoodsMapper; |
| | | import com.doumee.dao.business.model.*; |
| | | import com.doumee.dao.web.dto.CollectDTO; |
| | | import com.doumee.dao.web.request.CollectSaveRequest; |
| | | import com.doumee.service.business.CollectService; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import org.apache.commons.collections4.MapUtils; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.apache.shiro.SecurityUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | @Autowired |
| | | private CollectMapper collectMapper; |
| | | |
| | | @Autowired |
| | | private GoodsMapper goodsMapper; |
| | | |
| | | @Autowired |
| | | private ActivityMapper activityMapper; |
| | | |
| | | @Autowired |
| | | private SystemDictDataBiz systemDictDataBiz; |
| | | @Override |
| | | public Integer create(Collect collect,Integer memberId) { |
| | | |
| | | Collect target = new Collect(); |
| | | target.setCreateDate(new Date()); |
| | | target.setEditDate(new Date()); |
| | |
| | | }).collect(Collectors.toMap(s -> s.getObjId(), s -> s)); |
| | | return collect; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | @Override |
| | | public void saveCollect(CollectSaveRequest request, Integer memberId){ |
| | | if(collectMapper.selectCount(new QueryWrapper<Collect>().lambda() |
| | | .eq(Collect::getMemberId,memberId) |
| | | .eq(Collect::getObjType,request.getType()) |
| | | .eq(Collect::getObjId,request.getObjId()) |
| | | )<= Constants.ZERO){ |
| | | Collect target = new Collect(); |
| | | target.setCreateDate(new Date()); |
| | | target.setEditDate(new Date()); |
| | | target.setMemberId(memberId); |
| | | target.setObjId(request.getObjId()); |
| | | target.setObjType(request.getType()); |
| | | collectMapper.insert(target); |
| | | }; |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public List<Collect> myCollect(Integer memberId,Integer type){ |
| | | List<Collect> collectList = new ArrayList<>(); |
| | | if(Constants.equalsInteger(type,Constants.ZERO)){ |
| | | collectList = collectMapper.selectJoinList(Collect.class,new MPJLambdaWrapper<Collect>() |
| | | .selectAll(Collect.class) |
| | | .selectAs(Goods::getName,Collect::getName) |
| | | .selectAs(Goods::getPrice,Collect::getPrice) |
| | | .selectAs(Goods::getImgurl,Collect::getImgurl) |
| | | .select(" ifnull(( select min(gs.PRICE) from goods_sku gs where gs.GOODS_ID = t1.id ),0) ", Collect::getLinePrice) |
| | | .leftJoin(Goods.class,Goods::getId,Collect::getObjId) |
| | | .eq(Collect::getIsdeleted,Constants.ZERO) |
| | | .eq(Collect::getMemberId,memberId) |
| | | .eq(Collect::getObjType,type) |
| | | .orderByDesc(Collect::getId) |
| | | ); |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(collectList)){ |
| | | String preFixPath = systemDictDataBiz.getPreFixPath(Constants.RESOURCE_PATH, Constants.GOODS_FILE); |
| | | collectList.forEach(s->s.setImgurl(preFixPath+s.getImgurl())); |
| | | } |
| | | }else{ |
| | | collectList = collectMapper.selectJoinList(Collect.class,new MPJLambdaWrapper<Collect>() |
| | | .selectAll(Collect.class) |
| | | .selectAs(Activity::getName,Collect::getName) |
| | | .selectAs(Activity::getCreateDate,Collect::getReleaseDate) |
| | | .selectAs(Activity::getLooknum,Collect::getReadNum) |
| | | .selectAs(Activity::getImgurl,Collect::getImgurl) |
| | | .selectAs(Labels::getName,Collect::getLabelName) |
| | | .selectAs(Activity::getContent,Collect::getContent) |
| | | .leftJoin(Activity.class,Activity::getId,Collect::getObjId) |
| | | .leftJoin(Labels.class,Labels::getId,Activity::getLabelId) |
| | | .eq(Collect::getIsdeleted,Constants.ZERO) |
| | | .eq(Collect::getMemberId,memberId) |
| | | .eq(Collect::getObjType,type) |
| | | .orderByDesc(Collect::getId) |
| | | ); |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(collectList)){ |
| | | String preFixPath = systemDictDataBiz.getPreFixPath(Constants.RESOURCE_PATH, Constants.ACTIVITY_FILE); |
| | | collectList.forEach(s->s.setImgurl(preFixPath+s.getImgurl())); |
| | | collectList.stream().filter(s-> StringUtils.isNotBlank(s.getContent())).forEach(s->s.setContent(RichTextProcessor.extractPlainTextFromHtml(s.getContent()))); |
| | | } |
| | | } |
| | | return collectList; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | @Autowired |
| | | private MultifileService multifileService; |
| | | |
| | | @Autowired |
| | | private CollectMapper collectMapper; |
| | | |
| | | |
| | | @Autowired |
| | | private GoodsAdminJoinMapper goodsAdminJoinMapper; |
| | |
| | | if (!CollectionUtils.isEmpty(page.getRecords())){ |
| | | String preFixPath = systemDictDataBiz.getPreFixPath(Constants.RESOURCE_PATH, Constants.GOODS_FILE); |
| | | page.getRecords().forEach(s->s.setImgurl(preFixPath+s.getImgurl())); |
| | | |
| | | } |
| | | return page; |
| | | } |
| | |
| | | |
| | | |
| | | @Override |
| | | public GoodsInfoResponse getGoodsInfo(Integer goodsId) { |
| | | |
| | | public GoodsInfoResponse getGoodsInfo(Integer goodsId,Integer memberId) { |
| | | String fullUrl = systemDictDataBiz.queryByCode(Constants.OSS,Constants.RESOURCE_PATH).getCode()+ |
| | | systemDictDataBiz.queryByCode(Constants.OSS,Constants.GOODS_FILE).getCode(); |
| | | GoodsInfoResponse goodsResponse = goodsMapper.getGoodsInfo(goodsId); |
| | |
| | | Constants.GOODS_FILE); |
| | | List<MultiFileDTO> multiFileDTOS = objAllFileUrl.get(Constants.MultiFile.PLATFORM_GOOD_ROTATION.getKey()); |
| | | goodsResponse.setGoodBannerMultiFiles(multiFileDTOS); |
| | | goodsResponse.setCollectStatus(Constants.ZERO); |
| | | if(Objects.nonNull(memberId)){ |
| | | goodsResponse.setCollectStatus(collectMapper.selectCount(new QueryWrapper<Collect>().lambda() |
| | | .eq(Collect::getMemberId,memberId) |
| | | .eq(Collect::getObjId,goodsId) |
| | | .eq(Collect::getObjType,Constants.ONE) |
| | | )>Constants.ZERO?Constants.ONE:Constants.ZERO); |
| | | } |
| | | |
| | | return goodsResponse; |
| | | } |
| | |
| | | private ShopGoodsRelationMapper shopGoodsRelationMapper; |
| | | @Autowired |
| | | private MemberMapper memberMapper; |
| | | @Autowired |
| | | private CouponMapper couponMapper; |
| | | @Autowired |
| | | private MemberCouponJoinMapper memberCouponJoinMapper; |
| | | @Autowired |
| | | private InviteRecordMapper inviteRecordMapper; |
| | | |
| | | @Autowired |
| | | private GoodsorderDetailMapper goodsorderDetailMapper; |
| | |
| | | //æ ¹æ®è®¢åç±»åè¿è¡ç§¯åèµ é |
| | | //ä¸å确认æ¶è´§ ï¼èµ éç»éå积å |
| | | this.orderAddShopIntegral(goodsorder); |
| | | //ä¸å宿 æ ¹æ®ä¿¡æ¯ç¡®è®¤æ¯å¦éè¦èµ éé请è
伿 å¸ |
| | | this.orderDoneRewardInviteCoupon(goodsorder); |
| | | //æ¶è´¹è
确认æ¶è´§ |
| | | this.orderAddMemberIntegral(goodsorder); |
| | | //ç»éå ç»ç®éé¢ |
| | | this.orderAddShopCash(goodsorder); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 订å确认æ¶è´§ï¼èµ éé请è
伿 å¸ |
| | | * @param |
| | | */ |
| | | public void orderDoneRewardInviteCoupon(Goodsorder goodsorder){ |
| | | PlatformConfigDTO platformConfigDTO = systemDictDataService.getPlatformConfigDTO(); |
| | | if (platformConfigDTO.getShareCouponRewardStatus().equals(Constants.ONE)) { |
| | | return; |
| | | } |
| | | Member member = memberMapper.selectById(goodsorder.getMemberId()); |
| | | if(Objects.isNull(member)||member.getIsdeleted().equals(Constants.ONE)){ |
| | | return; |
| | | } |
| | | InviteRecord inviteRecord = inviteRecordMapper.selectOne(new QueryWrapper<InviteRecord>().lambda() |
| | | .eq(InviteRecord::getMemberId,member.getId()) |
| | | .eq(InviteRecord::getIsdeleted,Constants.ZERO) |
| | | .eq(InviteRecord::getFirstOrderStatus,Constants.ZERO) |
| | | .last("limit 1") |
| | | ); |
| | | if(Objects.isNull(inviteRecord)){ |
| | | return; |
| | | } |
| | | Member inviteMember = memberMapper.selectById(inviteRecord.getInviteId()); |
| | | if(Objects.isNull(inviteMember)||inviteMember.getIsdeleted().equals(Constants.ONE)){ |
| | | return; |
| | | } |
| | | |
| | | List<JSONObject> shareCouponRewardList = platformConfigDTO.getShareCouponRewardList(); |
| | | //[{"num":"2","couponId":6},{"num":"3","couponId":5}] |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(shareCouponRewardList)){ |
| | | List<MemberCoupon> memberCouponList = new ArrayList<>(); |
| | | for (JSONObject jsonObject:shareCouponRewardList) { |
| | | Integer couponId = jsonObject.getInteger("couponId"); |
| | | Integer num = jsonObject.getInteger("num"); |
| | | Coupon coupon = couponMapper.selectById(couponId); |
| | | if(Objects.isNull(coupon)||Constants.equalsInteger(coupon.getIsdeleted(),Constants.ONE)&&num>Constants.ZERO){ |
| | | continue; |
| | | } |
| | | MemberCoupon memberCoupon = MemberCoupon.couponToBean(coupon,inviteMember,new Date(),Constants.ONE,null); |
| | | for (int i = 0; i < num; i++) { |
| | | memberCouponList.add(memberCoupon); |
| | | } |
| | | } |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(memberCouponList)){ |
| | | memberCouponJoinMapper.insert(memberCouponList); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * è®¢åæ ¸é |
| | |
| | | if(Constants.equalsInteger(goodsorder.getPayMethod(),Constants.ZERO)){ |
| | | //èµ éæ¶è´¹è
积å |
| | | this.orderAddMemberIntegral(goodsorder); |
| | | //ä¸å宿 æ ¹æ®ä¿¡æ¯ç¡®è®¤æ¯å¦éè¦èµ éé请è
伿 å¸ |
| | | this.orderDoneRewardInviteCoupon(goodsorder); |
| | | //ç»éå æ·»å èµ é积å |
| | | this.orderAddShopIntegral(goodsorder); |
| | | //ç»éå ç»ç®éé¢ |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.service.business.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.doumee.biz.system.SystemDictDataBiz; |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.exception.BusinessException; |
| | | import com.doumee.core.model.LoginUserInfo; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.DateUtil; |
| | | import com.doumee.core.utils.GeneratePicUtil; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.core.utils.aliyun.ALiYunUtil; |
| | | import com.doumee.core.wx.WxMiniConfig; |
| | | import com.doumee.dao.business.IntegralMapper; |
| | | import com.doumee.dao.business.InviteRecordMapper; |
| | | import com.doumee.dao.business.MemberMapper; |
| | | import com.doumee.dao.business.ShopMapper; |
| | | import com.doumee.dao.business.join.IntegralJoinMapper; |
| | | import com.doumee.dao.business.model.Integral; |
| | | import com.doumee.dao.business.model.InviteRecord; |
| | | import com.doumee.dao.business.model.Member; |
| | | import com.doumee.dao.business.model.Shop; |
| | | import com.doumee.dao.web.dto.IntegralDTO; |
| | | import com.doumee.dao.web.dto.IntegralRecordDTO; |
| | | import com.doumee.dao.web.request.DealIntegralRequest; |
| | | import com.doumee.dao.web.response.IntegralDataResponse; |
| | | import com.doumee.dao.web.response.InviteInfoResponse; |
| | | import com.doumee.service.business.IntegralService; |
| | | import com.doumee.service.business.InviteRecordService; |
| | | import com.github.xiaoymin.knife4j.core.util.CollectionUtils; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.apache.http.util.TextUtils; |
| | | import org.apache.shiro.SecurityUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.awt.image.BufferedImage; |
| | | import java.io.IOException; |
| | | import java.io.InputStream; |
| | | import java.math.BigDecimal; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * ç¨æ·éè¯·è®°å½ |
| | | * @author æ±è¹è¹ |
| | | * @date 2026å¹´1æ20æ¥09:32:12 |
| | | */ |
| | | @Service |
| | | public class InviteRecordServiceImpl implements InviteRecordService { |
| | | |
| | | @Autowired |
| | | private InviteRecordMapper inviteRecordMapper; |
| | | |
| | | @Autowired |
| | | private SystemDictDataBiz systemDictDataBiz; |
| | | |
| | | @Override |
| | | public InviteInfoResponse getInviteInfo(Integer memberId){ |
| | | InviteInfoResponse inviteInfoResponse = new InviteInfoResponse(); |
| | | inviteInfoResponse.setInviteNum(Constants.ZERO); |
| | | inviteInfoResponse.setNum(0l); |
| | | inviteInfoResponse.setInviteRule(systemDictDataBiz.queryByCode(Constants.ORDER_SET,Constants.INVITE_RULE).getCode()); |
| | | |
| | | List<InviteRecord> inviteRecordList = inviteRecordMapper.selectJoinList(InviteRecord.class, |
| | | new MPJLambdaWrapper<InviteRecord>() |
| | | .selectAll(InviteRecord.class) |
| | | .selectAs(Member::getNickname,InviteRecord::getMemberName) |
| | | .selectAs(Member::getImgurl,InviteRecord::getImgUrl) |
| | | .leftJoin(Member.class,Member::getId,InviteRecord::getMemberId) |
| | | .eq(InviteRecord::getIsdeleted,Constants.ZERO) |
| | | .eq(InviteRecord::getMemberId,memberId) |
| | | .orderByDesc(InviteRecord::getId) |
| | | ); |
| | | |
| | | if (CollectionUtils.isNotEmpty(inviteRecordList)) { |
| | | inviteInfoResponse.setInviteRecordList(inviteRecordList); |
| | | inviteInfoResponse.setInviteNum(inviteRecordList.size()); |
| | | BigDecimal num = BigDecimal.ZERO; |
| | | String path = systemDictDataBiz.queryByCode(Constants.OSS,Constants.RESOURCE_PATH).getCode()+ |
| | | systemDictDataBiz.queryByCode(Constants.OSS,Constants.MEMBER_FILE).getCode(); |
| | | for (InviteRecord inviteRecord:inviteRecordList) { |
| | | if(StringUtils.isNotBlank(inviteRecord.getImgUrl())){ |
| | | inviteRecord.setImgUrl(path + inviteRecord.getImgUrl()); |
| | | } |
| | | num = num.add(inviteRecord.getRewardIntegral()).add(inviteRecord.getFirstRewardIntegral()); |
| | | } |
| | | inviteInfoResponse.setNum(num.longValue()); |
| | | } |
| | | |
| | | return inviteInfoResponse; |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public String createShareImg(Integer memberId) throws Exception { |
| | | String imgUrl = systemDictDataBiz.queryByCode(Constants.ORDER_SET,Constants.INVITE_IMG_URL).getCode(); |
| | | BufferedImage img1 = GeneratePicUtil.transfromToImage(imgUrl,imgUrl.substring(imgUrl.lastIndexOf(".") + 1)); |
| | | if (img1 == null) { |
| | | return imgUrl; |
| | | } |
| | | String url = null; |
| | | String scene = "m_" + memberId; |
| | | //å
容å享海æ¥å¾ç |
| | | InputStream mpCode = Constants.generateWxMiniImgStream( |
| | | scene, |
| | | "", |
| | | false);//å°ç¨åº |
| | | InputStream inputStream = GeneratePicUtil.generateShareWithUserImg( |
| | | img1 |
| | | , mpCode); |
| | | ALiYunUtil obs = new ALiYunUtil( |
| | | systemDictDataBiz.queryByCode(Constants.OSS,Constants.ENDPOINT).getCode() |
| | | ,systemDictDataBiz.queryByCode(Constants.OSS,Constants.ACCESS_ID).getCode(), systemDictDataBiz.queryByCode(Constants.OSS,Constants.ACCESS_KEY).getCode()); |
| | | String shareFolder = systemDictDataBiz.queryByCode(Constants.RESOURCE_PATH, Constants.SHARES_FILE).getCode(); |
| | | String key = DateUtil.getNowShortDate() + "/" + UUID.randomUUID().toString() + ".jpg"; |
| | | String fileName = shareFolder + key; |
| | | if (obs.uploadOnlineObject(inputStream,systemDictDataBiz.queryByCode(Constants.OSS, Constants.BUCKETNAME).getCode(), key,null)) { |
| | | url = systemDictDataBiz.queryByCode(Constants.OSS,Constants.RESOURCE_PATH).getCode() + fileName; |
| | | } |
| | | return url; |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | for(Member member : memberList){ |
| | | for (int i = 0; i < Constants.formatLongNum(param.getNum()); i++) { |
| | | //æ¨ä¸ªé |
| | | addList.add(initMemberCouponByParam(coupon,member,loginUserInfo,now)); |
| | | addList.add(MemberCoupon.couponToBean(coupon,member,now,Constants.TWO,loginUserInfo)); |
| | | } |
| | | } |
| | | index++; |
| | |
| | | return "æä½æå,æåäººåæ°éï¼"+memberList.size()+",å
±åæ¾ä¼æ 叿°éï¼"+addList.size(); |
| | | |
| | | } |
| | | /* |
| | | |
| | | private MemberCoupon initMemberCouponByParam(Coupon coupon, Member member, LoginUserInfo loginUserInfo ,Date now) { |
| | | MemberCoupon insert = new MemberCoupon(); |
| | |
| | | insert.setCouponId(coupon.getId()); |
| | | return insert; |
| | | } |
| | | */ |
| | | |
| | | private Coupon getCouponFromListById(Integer id, List<Coupon> couponList) { |
| | | for(Coupon c : couponList){ |
| | |
| | | import com.doumee.dao.business.model.*; |
| | | import com.doumee.dao.system.SystemUserMapper; |
| | | import com.doumee.dao.system.dto.MemberRechargeDTO; |
| | | import com.doumee.dao.system.dto.PlatformConfigDTO; |
| | | import com.doumee.dao.web.dto.MemberOwnDTO; |
| | | import com.doumee.dao.web.dto.shop.Position; |
| | | import com.doumee.dao.system.model.SystemUser; |
| | |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.doumee.service.system.SystemDictDataService; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import io.swagger.models.auth.In; |
| | | import io.swagger.util.Yaml; |
| | |
| | | @Autowired |
| | | private MemberMapper memberMapper; |
| | | @Autowired |
| | | private CouponMapper couponMapper; |
| | | @Autowired |
| | | private MemberCouponJoinMapper memberCouponJoinMapper; |
| | | @Autowired |
| | | private IntegralMapper integralMapper; |
| | | @Autowired |
| | | private ShopMapper shopMapper; |
| | |
| | | @Autowired |
| | | private MemberJoinMapper memberJoinMapper; |
| | | |
| | | @Autowired |
| | | private InviteRecordMapper inviteRecordMapper; |
| | | |
| | | |
| | | @Autowired |
| | | private SystemUserMapper systemUserMapper; |
| | | |
| | | @Autowired |
| | | private SystemDictDataBiz systemDictDataBiz; |
| | | |
| | | @Autowired |
| | | private SystemDictDataService systemDictDataService; |
| | | |
| | | @Autowired |
| | | private UploadFileService uploadFileService; |
| | |
| | | |
| | | |
| | | @Override |
| | | public AccountResponse wxLogin(String code,Integer recId){ |
| | | public AccountResponse wxLogin(String code){ |
| | | try { |
| | | //è·åå¾®ä¿¡æææ°æ® |
| | | WxMaJscode2SessionResult session = WxMiniConfig.wxMaService.getUserService().getSessionInfo(code); |
| | |
| | | AccountResponse accountResponse = new AccountResponse(); |
| | | accountResponse.setSessionKey(session.getSessionKey()); |
| | | if(Objects.nonNull(member)){ |
| | | if(Objects.isNull(member.getRecId())){ |
| | | member.setRecId(recId); |
| | | } |
| | | memberMapper.updateById(member); |
| | | member.setImgFullUrl(systemDictDataBiz.queryByCode(Constants.OSS,Constants.RESOURCE_PATH).getCode()+ |
| | | systemDictDataBiz.queryByCode(Constants.OSS,Constants.MEMBER_FILE).getCode()+member.getImgurl()); |
| | |
| | | return accountResponse; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * æ ¹æ®openidè·åæ¯å¦ç»å®äºåæ· |
| | | * @param openid |
| | | * @param memberId |
| | | * @return |
| | | */ |
| | | public AccountResponse shopOpenidLogin(String openid, Integer memberId){ |
| | | Shop shop = shopMapper.selectOne(new QueryWrapper<Shop>().lambda().eq(Shop::getOpenId, openid) |
| | | .eq(Shop::getIsdeleted,Constants.ZERO) |
| | | .last("limit 1") |
| | | ); |
| | | AccountResponse accountResponse = new AccountResponse(); |
| | | accountResponse.setOpenid(openid); |
| | | if(Objects.nonNull(shop)){ |
| | | if(Objects.isNull(memberId) |
| | | && ( Objects.isNull(shop.getMemberId()) |
| | | || !Constants.equalsInteger(shop.getMemberId(),memberId))){ |
| | | shopMapper.update(null,new UpdateWrapper<Shop>().lambda() |
| | | .set(Shop::getMemberId,memberId) |
| | | .eq(Shop::getId,shop.getId()) |
| | | ); |
| | | } |
| | | JwtPayLoad payLoad = new JwtPayLoad(Constants.SHOP_PREFIX+shop.getId()); |
| | | String token = JwtTokenUtil.generateToken(payLoad); |
| | | accountResponse.setToken(token); |
| | | } |
| | | return accountResponse; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * åæ·è´¦å·å¯ç ç»å½ |
| | | * @param userName |
| | | * @param password |
| | | * @param openid |
| | | * @param memberId |
| | | * @return |
| | | */ |
| | | public AccountResponse shopPasswordLogin(String userName,String password,String openid,String memberId){ |
| | | if(StringUtils.isBlank(userName) |
| | | || StringUtils.isBlank(password)){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"ç¨æ·åæå¯ç ä¸è½ä¸ºç©º"); |
| | | } |
| | | Shop shop = shopMapper.selectOne(new QueryWrapper<Shop>().lambda().eq(Shop::getUsername, userName) |
| | | .eq(Shop::getIsdeleted,Constants.ZERO) |
| | | .last("limit 1") |
| | | ); |
| | | if(shop==null){ |
| | | throw new BusinessException(ResponseStatus.ACCOUNT_INCORRECT); |
| | | } |
| | | //å å¯å¯ç |
| | | String pwd = Utils.Secure.encryptPassword(password, shop.getSalt()); |
| | | if(!pwd.equals(shop.getPassword())){ |
| | | throw new BusinessException(ResponseStatus.ACCOUNT_INCORRECT); |
| | | } |
| | | //å建token |
| | | JwtPayLoad payLoad = new JwtPayLoad(Constants.SHOP_PREFIX+shop.getId()); |
| | | String token = JwtTokenUtil.generateToken(payLoad); |
| | | AccountResponse accountResponse = new AccountResponse(); |
| | | accountResponse.setToken(token); |
| | | shopMapper.update(null,new UpdateWrapper<Shop>().lambda() |
| | | .set(Shop::getOpenId,openid) |
| | | .set(Shop::getMemberId,memberId) |
| | | .eq(Shop::getId,shop.getId()) |
| | | ); |
| | | shopMapper.update(null,new UpdateWrapper<Shop>().lambda() |
| | | .set(Shop::getOpenId,null) |
| | | .eq(Shop::getOpenId,openid) |
| | | .ne(Shop::getId,shop.getId()) |
| | | ); |
| | | return accountResponse; |
| | | } |
| | | |
| | | @Override |
| | | public AccountResponse wxPhone(WxPhoneRequest wxPhoneRequest){ |
| | | try { |
| | |
| | | member.setIsdeleted(Constants.ZERO); |
| | | member.setType(Constants.ZERO); |
| | | member.setOrigin(Constants.ZERO); |
| | | member.setRecId(wxPhoneRequest.getRecId()); |
| | | if(!this.checkIsCreateInvite(phone)){ |
| | | member.setRecId(Constants.getInviteCode(wxPhoneRequest.getRecId())); |
| | | } |
| | | member.setOpenId(wxPhoneRequest.getOpenid()); |
| | | } |
| | | member.setPhone(phone); |
| | |
| | | systemDictDataBiz.queryByCode(Constants.OSS,Constants.MEMBER_FILE).getCode()+member.getImgurl()); |
| | | if(Objects.isNull(member.getId())){ |
| | | memberMapper.insert(member); |
| | | |
| | | PlatformConfigDTO platformConfigDTO = systemDictDataService.getPlatformConfigDTO(); |
| | | this.createRegionReward(member,platformConfigDTO); |
| | | //å建éè¯·è®°å½ |
| | | this.createInviteRecord(member,platformConfigDTO); |
| | | member.setSharingCode(this.createShareCode(member.getId())); |
| | | memberMapper.updateById(member); |
| | | }else{ |
| | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * åæ¾æ³¨åå¥å±ä¿¡æ¯ |
| | | * @param member |
| | | * @param platformConfigDTO |
| | | */ |
| | | public void createRegionReward(Member member,PlatformConfigDTO platformConfigDTO){ |
| | | //æ¥è¯¢ç¨æ·æ¯å¦æ³¨éè¿ |
| | | if(memberMapper.selectCount(new QueryWrapper<Member>().lambda() |
| | | .eq(Member::getIsdeleted,Constants.ONE) |
| | | .eq(Member::getPhone,member.getPhone()) |
| | | )>Constants.ZERO){ |
| | | return; |
| | | } |
| | | //å¼å¯æ³¨åé积å |
| | | if(Constants.equalsInteger(platformConfigDTO.getRegIntegralRewardStatus(),Constants.ZERO)){ |
| | | DealIntegralRequest dealIntegralRequest = new DealIntegralRequest(); |
| | | dealIntegralRequest.setIntegralNum(platformConfigDTO.getRegIntegralReward()); |
| | | dealIntegralRequest.setDealType(Constants.ZERO); |
| | | dealIntegralRequest.setMemberId(member.getId()); |
| | | dealIntegralRequest.setIntegralObjType(Constants.IntegralObjType.REGISTER); |
| | | integralService.dealIntegral(dealIntegralRequest); |
| | | } |
| | | //å¼å¯æ³¨åé伿 å¸ |
| | | if(Constants.equalsInteger(platformConfigDTO.getRegCouponRewardStatus(),Constants.ZERO)){ |
| | | List<JSONObject> regCouponRewardList = platformConfigDTO.getRegCouponRewardList(); |
| | | //[{"num":"2","couponId":6},{"num":"3","couponId":5}] |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(regCouponRewardList)){ |
| | | List<MemberCoupon> memberCouponList = new ArrayList<>(); |
| | | for (JSONObject jsonObject:regCouponRewardList) { |
| | | Integer couponId = jsonObject.getInteger("couponId"); |
| | | Integer num = jsonObject.getInteger("num"); |
| | | Coupon coupon = couponMapper.selectById(couponId); |
| | | if(Objects.isNull(coupon)||Constants.equalsInteger(coupon.getIsdeleted(),Constants.ONE)&&num>Constants.ZERO){ |
| | | continue; |
| | | } |
| | | MemberCoupon memberCoupon = MemberCoupon.couponToBean(coupon,member,new Date(),Constants.ZERO,null); |
| | | for (int i = 0; i < num; i++) { |
| | | memberCouponList.add(memberCoupon); |
| | | } |
| | | } |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(memberCouponList)){ |
| | | memberCouponJoinMapper.insert(memberCouponList); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * å建éè¯·è®°å½ |
| | | * @param member |
| | | */ |
| | | public void createInviteRecord(Member member,PlatformConfigDTO platformConfigDTO){ |
| | | if(Objects.isNull(member.getRecId())){ |
| | | return; |
| | | } |
| | | InviteRecord inviteRecord = new InviteRecord(); |
| | | inviteRecord.setCreateDate(new Date()); |
| | | inviteRecord.setIsdeleted(Constants.ZERO); |
| | | inviteRecord.setInviteId(member.getRecId()); |
| | | inviteRecord.setMemberId(member.getId()); |
| | | inviteRecord.setPhone(member.getPhone()); |
| | | inviteRecord.setRewardIntegral(Objects.nonNull(platformConfigDTO)&&Constants.equalsInteger(platformConfigDTO.getShareIntegralRewardStatus(),Constants.ZERO)? |
| | | platformConfigDTO.getShareIntegralReward():BigDecimal.ZERO); |
| | | inviteRecord.setFirstOrderStatus(Constants.ZERO); |
| | | inviteRecordMapper.insert(inviteRecord); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * æ¥è¯¢æ¯å¦å建è¿é请 |
| | | * @param mobile |
| | | * @return |
| | | */ |
| | | public Boolean checkIsCreateInvite(String mobile){ |
| | | return inviteRecordMapper.selectCount(new QueryWrapper<InviteRecord>() |
| | | .lambda() |
| | | .eq(InviteRecord::getPhone,mobile) |
| | | )>Constants.ZERO?true:false; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | public String createShareCode(Integer memberId){ |
| | | //çæå享ç |
| | |
| | | @ApiOperation(value = "å°ç¨åºç»éæ¹å¼", notes = "å°ç¨åºç«¯") |
| | | @GetMapping("/wxLogin") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "query", dataType = "String", name = "code", value = "微信code", required = true), |
| | | @ApiImplicitParam(paramType = "query", dataType = "Integer", name = "recId", value = "å享ç ", required = false) |
| | | @ApiImplicitParam(paramType = "query", dataType = "String", name = "code", value = "微信code", required = true) |
| | | }) |
| | | public ApiResponse<AccountResponse> wxLogin(@RequestParam String code, Integer recId) { |
| | | return ApiResponse.success(memberService.wxLogin(code,recId)); |
| | | public ApiResponse<AccountResponse> wxLogin(@RequestParam String code) { |
| | | return ApiResponse.success(memberService.wxLogin(code)); |
| | | } |
| | | |
| | | @LoginRequired |
| | |
| | | */ |
| | | @Api(tags = "æ´»å¨ä¸å¡") |
| | | @Trace(exclude = true) |
| | | @RestController |
| | | //@RestController |
| | | @RequestMapping("/web/activity") |
| | | @Slf4j |
| | | public class ActivityApi extends ApiController{ |
| | |
| | | @Autowired |
| | | public FundService fundService; |
| | | |
| | | @Autowired |
| | | public InviteRecordService inviteRecordService; |
| | | |
| | | |
| | | /** |
| | | * å¾å°request对象 |
| | |
| | | * @create 2023/3/23 17:33 |
| | | */ |
| | | @Api(tags = "åå¡ç¾ç§") |
| | | @RestController |
| | | //@RestController |
| | | @RequestMapping("/web/article") |
| | | @Slf4j |
| | | public class ArticleApi extends ApiController{ |
| | |
| | | */ |
| | | @Api(tags = "å
å¼å¡ä¿¡æ¯") |
| | | @Trace(exclude = true) |
| | | @RestController |
| | | //@RestController |
| | | @RequestMapping("/web/card") |
| | | @LoginRequired |
| | | @Slf4j |
| | |
| | | */ |
| | | @Api(tags = "åè±ä»»å¡ä¸å¡") |
| | | @Trace(exclude = true) |
| | | @RestController |
| | | //@RestController |
| | | @RequestMapping("/web/coffeeBeanTask") |
| | | @Slf4j |
| | | @LoginRequired |
| | |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.dao.business.model.Collect; |
| | | import com.doumee.dao.web.request.CollectSaveRequest; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | |
| | | /** |
| | |
| | | @Api(tags = "ç¨æ·æ¶èä¿¡æ¯è¡¨") |
| | | @RestController |
| | | @RequestMapping("/web/collect") |
| | | @LoginRequired |
| | | public class CollectApi extends ApiController{ |
| | | |
| | | @LoginRequired |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | | @PostMapping("/create") |
| | | public ApiResponse create(@RequestBody Collect collect) { |
| | | return ApiResponse.success(collectService.create(collect,getMemberId())); |
| | | @ApiOperation("å建æ¶è") |
| | | @PostMapping("/saveCollect") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "ç¨æ·tokenå¼", required = true), |
| | | }) |
| | | public ApiResponse saveCollect(@RequestBody CollectSaveRequest request) { |
| | | collectService.saveCollect(request,getMemberId()); |
| | | return ApiResponse.success("æä½æå"); |
| | | } |
| | | |
| | | |
| | | @LoginRequired |
| | | @ApiOperation("åæ¶æ¶è") |
| | | @GetMapping("/cancel/batch") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "ç¨æ·tokenå¼", required = true), |
| | | }) |
| | | public ApiResponse deleteByIdInBatch(@RequestParam String ids) { |
| | | String [] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | | for (String id : idArray) { |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | collectService.deleteByIdInBatch(idList); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @LoginRequired |
| | | @ApiOperation("æçæ¶è") |
| | | @GetMapping("/myCollectList") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "ç¨æ·tokenå¼", required = true), |
| | | }) |
| | | public ApiResponse myCollectList(@RequestParam Integer type) { |
| | | return ApiResponse.success(collectService.myCollect(getMemberId(),type)); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | @Api(tags = "伿 å¸ä¸å¡") |
| | | @RestController |
| | | //@RestController |
| | | @RequestMapping("/web/coupon") |
| | | public class CouponApi extends ApiController{ |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | |
| | | * @date 2023/03/21 15:48 |
| | | */ |
| | | @Api(tags = "åä½ä¸å¿ç³ä¸å¡") |
| | | @RestController |
| | | //@RestController |
| | | @RequestMapping("/web/creationApply") |
| | | public class CreationApplyApi extends ApiController{ |
| | | |
| | |
| | | */ |
| | | @Api(tags = "æ ç¾ä¿¡æ¯è¡¨ä¸å¡") |
| | | @Trace(exclude = true) |
| | | @RestController |
| | | //@RestController |
| | | @RequestMapping("/web/labels") |
| | | @Slf4j |
| | | public class LabelsApi extends ApiController{ |
| | |
| | | @Api(tags = "ç¨æ·memberä¸å¡") |
| | | @Trace(exclude = true) |
| | | @LoginRequired |
| | | @RestController |
| | | //@RestController |
| | | @RequestMapping("/web/member") |
| | | @Slf4j |
| | | public class MemberApi extends ApiController{ |
| | |
| | | @Api(tags = "æ¶æ¯éç¥ä¿¡ä¸å¡") |
| | | @Trace(exclude = true) |
| | | @LoginRequired |
| | | @RestController |
| | | //@RestController |
| | | @RequestMapping("/web/notice") |
| | | @Slf4j |
| | | public class NoticeApi extends ApiController{ |
| | |
| | | package com.doumee.api.web; |
| | | |
| | | import com.doumee.config.annotation.LoginRequired; |
| | | import com.doumee.core.annotation.trace.Trace; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.dao.business.model.Shares; |
| | | import com.doumee.dao.web.request.WxPhoneRequest; |
| | | import com.doumee.dao.web.response.AccountResponse; |
| | | import com.doumee.dao.web.response.InviteInfoResponse; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.v3.oas.annotations.parameters.RequestBody; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.validation.Valid; |
| | | |
| | | @Api(tags = "ç¨æ·å享ä¸å¡") |
| | | @Trace(exclude = true) |
| | |
| | | public class SharesApi extends ApiController{ |
| | | |
| | | |
| | | /** |
| | | * å建 |
| | | * |
| | | * @param shares å®ä½å¯¹è±¡ |
| | | * @return Integer |
| | | */ |
| | | @ApiOperation(value = "ç¨æ·å建å享", notes = "å°ç¨åºç«¯") |
| | | @GetMapping("/getMemberDTO") |
| | | public ApiResponse<Integer> create(@RequestBody Shares shares){ |
| | | return ApiResponse.success(sharesService.create(shares,getMemberId())); |
| | | // /** |
| | | // * å建 |
| | | // * |
| | | // * @param shares å®ä½å¯¹è±¡ |
| | | // * @return Integer |
| | | // */ |
| | | // @ApiOperation(value = "ç¨æ·å建å享", notes = "å°ç¨åºç«¯") |
| | | // @GetMapping("/getMemberDTO") |
| | | // public ApiResponse<Integer> create(@RequestBody Shares shares){ |
| | | // return ApiResponse.success(sharesService.create(shares,getMemberId())); |
| | | // } |
| | | |
| | | @LoginRequired |
| | | @ApiOperation(value = "è·åé请信æ¯", notes = "å°ç¨åºç«¯") |
| | | @GetMapping("/getInviteInfo") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "ç¨æ·tokenå¼", required = true) |
| | | }) |
| | | public ApiResponse<InviteInfoResponse> getInviteInfo() { |
| | | return ApiResponse.success(inviteRecordService.getInviteInfo(getMemberId())); |
| | | } |
| | | |
| | | |
| | | @LoginRequired |
| | | @ApiOperation(value = "çæé请海æ¥", notes = "å°ç¨åºç«¯") |
| | | @GetMapping("/getShareImg") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "ç¨æ·tokenå¼", required = true) |
| | | }) |
| | | public ApiResponse<String> getShareImg() throws Exception{ |
| | | return ApiResponse.success(inviteRecordService.createShareImg(getMemberId())); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | @Api(tags = "åå®¶è¯è®ºç®¡çä¸å¡") |
| | | @Trace(exclude = true) |
| | | @RestController |
| | | //@RestController |
| | | @RequestMapping("/web/shopComment") |
| | | @Slf4j |
| | | public class ShopCommentApi extends ApiController{ |
| | |
| | | |
| | | @Api(tags = "åºéºå
³æ³¨ä¸å¡") |
| | | @Trace(exclude = true) |
| | | @RestController |
| | | //@RestController |
| | | @RequestMapping("/web/shopFollow") |
| | | @Slf4j |
| | | public class ShopFollowApi extends ApiController{ |
| | |
| | | |
| | | @Api(tags = "åºéºèåä¸å¡") |
| | | @Trace(exclude = true) |
| | | @RestController |
| | | //@RestController |
| | | @RequestMapping("/web/shopMenu") |
| | | @Slf4j |
| | | public class ShopMenuApi extends ApiController{ |
| | |
| | | |
| | | @Api(tags = "åå®¶æ°é²äº") |
| | | @Trace(exclude = true) |
| | | @RestController |
| | | //@RestController |
| | | @RequestMapping("/web/shopNew") |
| | | @Slf4j |
| | | public class ShopNewsApi extends ApiController { |
| | |
| | | |
| | | @Api(tags = "ç¾å°ä¸å¡") |
| | | @Trace(exclude = true) |
| | | @RestController |
| | | //@RestController |
| | | @RequestMapping("/web/signup") |
| | | @Slf4j |
| | | @LoginRequired |
| | |
| | | * @date 2023/03/21 15:48 |
| | | */ |
| | | @Api(tags = "ç¨æ·ç¹èµä¿¡æ¯è¡¨") |
| | | @RestController |
| | | //@RestController |
| | | @RequestMapping("/web/zan") |
| | | public class ZanApi extends ApiController{ |
| | | |
| | |
| | | */ |
| | | @Api(tags = "ååå®å") |
| | | @Trace(exclude = true) |
| | | @RestController |
| | | //@RestController |
| | | @RequestMapping("/web/aftersale") |
| | | public class AftersaleApi extends ApiController { |
| | | @Autowired |
| | |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "ç¨æ·tokenå¼", required = true), |
| | | @ApiImplicitParam(paramType = "query", dataType = "Integer", name = "goodsId", value = "åå主é®", required = true), |
| | | @ApiImplicitParam(paramType = "query", dataType = "Integer", name = "memberId", value = "ç¨æ·ä¸»é®", required = true), |
| | | }) |
| | | public ApiResponse<GoodsInfoResponse> goodsInfo(@RequestParam Integer goodsId) { |
| | | GoodsInfoResponse goodsInfoResponse = goodsService.getGoodsInfo(goodsId); |
| | | public ApiResponse<GoodsInfoResponse> goodsInfo(@RequestParam Integer goodsId,Integer memberId) { |
| | | GoodsInfoResponse goodsInfoResponse = goodsService.getGoodsInfo(goodsId,memberId); |
| | | return ApiResponse.success("æ¥è¯¢æå",goodsInfoResponse); |
| | | } |
| | | |
| | |
| | | <!-- hutool å·¥å
·ç¸å
³--> |
| | | <hutool.version>5.5.8</hutool.version> |
| | | <!-- 微信å°ç¨åº --> |
| | | <weixin-java-miniapp.version>4.1.0</weixin-java-miniapp.version> |
| | | <weixin-java-miniapp.version>4.7.8-20251023.110018</weixin-java-miniapp.version> |
| | | <!-- 微信æ¯ä» --> |
| | | <weixin-java-pay.version>4.1.0</weixin-java-pay.version> |
| | | <!-- é¿éäºOSSåå¨ --> |
| | |
| | | <artifactId>rocketmq-client-java</artifactId> |
| | | <version>5.0.4</version> |
| | | </dependency> |
| | | |
| | | <!--å¾çå缩--> |
| | | <dependency> |
| | | <groupId>net.coobird</groupId> |
| | | <artifactId>thumbnailator</artifactId> |
| | | <version>0.4.20</version> |
| | | </dependency> |
| | | |
| | | <dependency> |
| | | <groupId>org.jsoup</groupId> |
| | | <artifactId>jsoup</artifactId> |
| | | <version>1.15.3</version> |
| | | </dependency> |
| | | |
| | | <!--<dependency> |
| | | <groupId>com.aliyun.openservices</groupId> |
| | | <artifactId>ons-client</artifactId> |