提交查询门店和积分返利

yy_dev
袁野 1 year ago
parent 8ab50f8ec0
commit 923e3291b8
  1. 25
      cweb/src/main/java/com/cweb/controller/BsStoreCidController.java
  2. 1
      service/src/main/java/com/hfkj/service/BsStoreCidService.java
  3. 11
      service/src/main/java/com/hfkj/service/impl/BsStoreCidServiceImpl.java

@ -11,13 +11,11 @@ import com.hfkj.service.BsStoreCidService;
import com.hfkj.service.BsStoreService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.Date;
@ -47,7 +45,7 @@ public class BsStoreCidController {
try {
if (storeCid == null
|| storeCid.getCid() == null
|| StringUtils.isBlank(storeCid.getCid())
|| storeCid.getStoreId() == null
) {
log.error("configStore error!","参数错误");
@ -91,4 +89,21 @@ public class BsStoreCidController {
}
}
@RequestMapping(value="/voiceSucceed",method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "语音播报成功")
public ResponseData voiceSucceed(@RequestParam(value = "storeId", required = true) Long storeId) {
try {
bsStoreCidService.voiceSucceed(storeId);
return ResponseMsgUtil.success("操作成功");
} catch (Exception e) {
log.error(e.getMessage(), e);
return ResponseMsgUtil.exception(e);
}
}
}

@ -63,6 +63,7 @@ public interface BsStoreCidService {
*/
void getPushRecord(Long storeId);
void voiceSucceed(Long storeId);
/**
* @Author Sum1Dream

@ -144,6 +144,17 @@ public class BsStoreCidServiceImpl implements BsStoreCidService {
}
@Override
public void voiceSucceed(Long storeId) {
Map<String , Object> pushMap = new HashMap<>();
pushMap.put("storeId" , storeId);
pushMap.put("status" , 2);
BsStorePushRecord storePushRecord = findPushRecordByMap(pushMap);
storePushRecord.setStatus(1);
storePushRecordMapper.updateByPrimaryKey(storePushRecord);
}
@Override
public void insertStorePushRecord(BsStorePushRecord storePushRecord) {
storePushRecordMapper.insert(storePushRecord);

Loading…
Cancel
Save