记得上下班打卡 | git大法好,push需谨慎

Commit 25bf608a authored by 胡佳晨's avatar 胡佳晨

提交

parent bcc06750
......@@ -24,7 +24,7 @@ public interface IGoblinGoodsAnticipateService {
ResponseDto<Boolean> selectAnticipate(String skuId);
ResponseDto<Object> share(String skuId,String url);
ResponseDto<Object> share(String skuId);
ResponseDto<Object> help(String sid);
......
......@@ -5,6 +5,8 @@ import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.goblin.dto.vo.GoblinGoodsAnticipateHelpVo;
import com.liquidnet.service.goblin.service.IGoblinGoodsAnticipateService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -31,21 +33,29 @@ public class GoblinGoodsAnticipateController {
@ApiOperation("用户预约 (只能预约不能取消)")
@PostMapping("/userAbout")
@ApiImplicitParams({
@ApiImplicitParam(type = "query", dataType = "String", name = "skuId", value = "skuId", example = ""),
})
public ResponseDto<Object> userAbout(@RequestParam(name = "skuId", required = true) String skuId) {
return goblinGoodsAnticipateService.userAbout(skuId);
}
@ApiOperation("根据skuId和uid查询")
@GetMapping("/selectAnticipateBySkuIdAndUid")
@ApiImplicitParams({
@ApiImplicitParam(type = "query", dataType = "String", name = "skuId", value = "skuId", example = ""),
})
public ResponseDto<Boolean> selectAnticipate(@RequestParam(name = "skuId") String skuId) {
return goblinGoodsAnticipateService.selectAnticipate(skuId);
}
@ApiOperation("用户分享,根据sku发起助力")
@PostMapping("/share")
public ResponseDto<Object> share(@RequestParam(name = "skuId", required = true) String skuId,
@RequestParam(name = "url", required = false) String url) {
return goblinGoodsAnticipateService.share(skuId, url);
@ApiImplicitParams({
@ApiImplicitParam(type = "query", dataType = "String", name = "skuId", value = "skuId", example = ""),
})
public ResponseDto<Object> share(@RequestParam(name = "skuId", required = true) String skuId) {
return goblinGoodsAnticipateService.share(skuId);
}
@ApiOperation("用户为他人助力")
......
......@@ -125,7 +125,7 @@ public class GoblinGoodsAnticipateServiceImpl implements IGoblinGoodsAnticipateS
}
@Override
public ResponseDto<Object> share(String skuId, String url) {
public ResponseDto<Object> share(String skuId) {
//查询是否可以预约
GoblinGoodsAnticipateValueVo valueBySkuId = goblinRedisUtils.getValueBySkuId(skuId);
if (valueBySkuId == null) {
......@@ -152,7 +152,7 @@ public class GoblinGoodsAnticipateServiceImpl implements IGoblinGoodsAnticipateS
goblinGoodsAnticipateShareVo.setSid(sId);
goblinGoodsAnticipateShareVo.setUid(uid);
goblinGoodsAnticipateShareVo.setSkuId(skuId);
goblinGoodsAnticipateShareVo.setUrl(url);
// goblinGoodsAnticipateShareVo.setUrl(url);
goblinGoodsAnticipateShareVo.setCreatedDate(LocalDateTime.now());
goblinGoodsAnticipateShareVo.setAboutStartDate(valueBySkuId.getAboutStartDate());
goblinGoodsAnticipateShareVo.setAboutEndDate(valueBySkuId.getAboutEndDate());
......@@ -173,7 +173,7 @@ public class GoblinGoodsAnticipateServiceImpl implements IGoblinGoodsAnticipateS
goblinGoodsAnticipateShareVo.getSid(),
goblinGoodsAnticipateShareVo.getUid(),
goblinGoodsAnticipateShareVo.getSkuId(),
goblinGoodsAnticipateShareVo.getUrl(),
// goblinGoodsAnticipateShareVo.getUrl(),
goblinGoodsAnticipateShareVo.getCreatedDate()
});
sendRedis("goblin_goods_anticipate_share", sqlValue);
......
......@@ -141,7 +141,7 @@ goblin_goods_anticipate_value_update_proper=UPDATE goblin_goods_anticipate_value
goblin_goods_anticipate_value_delete=UPDATE goblin_goods_anticipate_value SET `del_tag` = 1,update_date = NOW() WHERE sku_id = ?
goblin_goods_anticipate_user=INSERT INTO goblin_goods_anticipate_user(uid,sku_id,phone,state,created_date) VALUES(?,?,?,?,?)
goblin_goods_anticipate_help=INSERT INTO goblin_goods_anticipate_help(sid,help_uid,created_date) VALUES(?,?,?)
goblin_goods_anticipate_share=INSERT INTO goblin_goods_anticipate_share(sid,uid,sku_id,url,created_date) VALUES(?,?,?,?,?)
goblin_goods_anticipate_share=INSERT INTO goblin_goods_anticipate_share(sid,uid,sku_id,created_date) VALUES(?,?,?,?)
goblin_goods_anticipate_user_update=UPDATE goblin_goods_anticipate_user SET state = 1 WHERE uid = ? AND sku_id = ?
goblin_goods_anticipate_user_update_sku=UPDATE goblin_goods_anticipate_user SET state = 1 WHERE sku_id = ?
#---- \u4E1A\u52A1\u8D26\u53F7\u8BB0\u5F55
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment