| | |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestHeader; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestMethod; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | @RestController |
| | | @RequestMapping(value = "/groupBuy") |
| | |
| | | * |
| | | * @param reqJson |
| | | * @return |
| | | * @serviceCode /groupBuyProduct/saveGroupBuyProduct |
| | | * @path /app/groupBuyProduct/saveGroupBuyProduct |
| | | * @serviceCode /groupBuy/saveGroupBuyProduct |
| | | * @path /app/groupBuy/saveGroupBuyProduct |
| | | */ |
| | | @RequestMapping(value = "/saveGroupBuyProduct", method = RequestMethod.POST) |
| | | public ResponseEntity<String> saveGroupBuyProduct(@RequestBody JSONObject reqJson, @RequestHeader(value = "store-id") String storeId) { |
| | |
| | | * |
| | | * @param reqJson |
| | | * @return |
| | | * @serviceCode /groupBuyProduct/updateGroupBuyProduct |
| | | * @path /app/groupBuyProduct/updateGroupBuyProduct |
| | | * @serviceCode /groupBuy/updateGroupBuyProduct |
| | | * @path /app/groupBuy/updateGroupBuyProduct |
| | | */ |
| | | @RequestMapping(value = "/updateGroupBuyProduct", method = RequestMethod.POST) |
| | | public ResponseEntity<String> updateGroupBuyProduct(@RequestBody JSONObject reqJson, @RequestHeader(value = "store-id") String storeId) { |
| | |
| | | * |
| | | * @param reqJson |
| | | * @return |
| | | * @serviceCode /groupBuyProduct/deleteGroupBuyProduct |
| | | * @path /app/groupBuyProduct/deleteGroupBuyProduct |
| | | * @serviceCode /groupBuy/deleteGroupBuyProduct |
| | | * @path /app/groupBuy/deleteGroupBuyProduct |
| | | */ |
| | | @RequestMapping(value = "/deleteGroupBuyProduct", method = RequestMethod.POST) |
| | | public ResponseEntity<String> deleteGroupBuyProduct(@RequestBody JSONObject reqJson, @RequestHeader(value = "store-id") String storeId) { |
| | |
| | | * |
| | | * @param storeId 商户 |
| | | * @return |
| | | * @serviceCode /groupBuyProduct/queryGroupBuyProduct |
| | | * @path /app/groupBuyProduct/queryGroupBuyProduct |
| | | * @serviceCode /groupBuy/queryGroupBuyProduct |
| | | * @path /app/groupBuy/queryGroupBuyProduct |
| | | */ |
| | | @RequestMapping(value = "/queryGroupBuyProduct", method = RequestMethod.GET) |
| | | public ResponseEntity<String> queryGroupBuyProduct(@RequestHeader(value = "store-id") String storeId, |
| | |
| | | * |
| | | * @param reqJson |
| | | * @return |
| | | * @serviceCode /groupBuySetting/saveGroupBuySetting |
| | | * @path /app/groupBuySetting/saveGroupBuySetting |
| | | * @serviceCode /groupBuy/saveGroupBuySetting |
| | | * @path /app/groupBuy/saveGroupBuySetting |
| | | */ |
| | | @RequestMapping(value = "/saveGroupBuySetting", method = RequestMethod.POST) |
| | | public ResponseEntity<String> saveGroupBuySetting(@RequestBody JSONObject reqJson) { |
| | | public ResponseEntity<String> saveGroupBuySetting(@RequestBody JSONObject reqJson, @RequestHeader(value = "store-id") String storeId) { |
| | | |
| | | Assert.hasKeyAndValue(reqJson, "groupBuyName", "请求报文中未包含groupBuyName"); |
| | | Assert.hasKeyAndValue(reqJson, "validHours", "请求报文中未包含validHours"); |
| | |
| | | |
| | | |
| | | GroupBuySettingPo groupBuySettingPo = BeanConvertUtil.covertBean(reqJson, GroupBuySettingPo.class); |
| | | groupBuySettingPo.setStoreId(storeId); |
| | | return saveGroupBuySettingBMOImpl.save(groupBuySettingPo); |
| | | } |
| | | |
| | |
| | | * |
| | | * @param reqJson |
| | | * @return |
| | | * @serviceCode /groupBuySetting/updateGroupBuySetting |
| | | * @path /app/groupBuySetting/updateGroupBuySetting |
| | | * @serviceCode /groupBuy/updateGroupBuySetting |
| | | * @path /app/groupBuy/updateGroupBuySetting |
| | | */ |
| | | @RequestMapping(value = "/updateGroupBuySetting", method = RequestMethod.POST) |
| | | public ResponseEntity<String> updateGroupBuySetting(@RequestBody JSONObject reqJson) { |
| | | public ResponseEntity<String> updateGroupBuySetting(@RequestBody JSONObject reqJson, @RequestHeader(value = "store-id") String storeId) { |
| | | |
| | | Assert.hasKeyAndValue(reqJson, "groupBuyName", "请求报文中未包含groupBuyName"); |
| | | Assert.hasKeyAndValue(reqJson, "validHours", "请求报文中未包含validHours"); |
| | |
| | | |
| | | |
| | | GroupBuySettingPo groupBuySettingPo = BeanConvertUtil.covertBean(reqJson, GroupBuySettingPo.class); |
| | | groupBuySettingPo.setStoreId(storeId); |
| | | return updateGroupBuySettingBMOImpl.update(groupBuySettingPo); |
| | | } |
| | | |
| | |
| | | * |
| | | * @param reqJson |
| | | * @return |
| | | * @serviceCode /groupBuySetting/deleteGroupBuySetting |
| | | * @path /app/groupBuySetting/deleteGroupBuySetting |
| | | * @serviceCode /groupBuy/deleteGroupBuySetting |
| | | * @path /app/groupBuy/deleteGroupBuySetting |
| | | */ |
| | | @RequestMapping(value = "/deleteGroupBuySetting", method = RequestMethod.POST) |
| | | public ResponseEntity<String> deleteGroupBuySetting(@RequestBody JSONObject reqJson) { |
| | | public ResponseEntity<String> deleteGroupBuySetting(@RequestBody JSONObject reqJson, @RequestHeader(value = "store-id") String storeId) { |
| | | Assert.hasKeyAndValue(reqJson, "communityId", "小区ID不能为空"); |
| | | |
| | | Assert.hasKeyAndValue(reqJson, "settingId", "settingId不能为空"); |
| | | |
| | | |
| | | GroupBuySettingPo groupBuySettingPo = BeanConvertUtil.covertBean(reqJson, GroupBuySettingPo.class); |
| | | groupBuySettingPo.setStoreId(storeId); |
| | | return deleteGroupBuySettingBMOImpl.delete(groupBuySettingPo); |
| | | } |
| | | |
| | |
| | | * |
| | | * @param storeId 商户ID |
| | | * @return |
| | | * @serviceCode /groupBuySetting/queryGroupBuySetting |
| | | * @path /app/groupBuySetting/queryGroupBuySetting |
| | | * @serviceCode /groupBuy/queryGroupBuySetting |
| | | * @path /app/groupBuy/queryGroupBuySetting |
| | | */ |
| | | @RequestMapping(value = "/queryGroupBuySetting", method = RequestMethod.GET) |
| | | public ResponseEntity<String> queryGroupBuySetting(@RequestHeader(value = "store-id") String storeId, |
| | |
| | | * |
| | | * @param reqJson |
| | | * @return |
| | | * @serviceCode /groupBuyProductSpec/saveGroupBuyProductSpec |
| | | * @path /app/groupBuyProductSpec/saveGroupBuyProductSpec |
| | | * @serviceCode /groupBuy/saveGroupBuyProductSpec |
| | | * @path /app/groupBuy/saveGroupBuyProductSpec |
| | | */ |
| | | @RequestMapping(value = "/saveGroupBuyProductSpec", method = RequestMethod.POST) |
| | | public ResponseEntity<String> saveGroupBuyProductSpec(@RequestBody JSONObject reqJson) { |
| | |
| | | * |
| | | * @param reqJson |
| | | * @return |
| | | * @serviceCode /groupBuyProductSpec/updateGroupBuyProductSpec |
| | | * @path /app/groupBuyProductSpec/updateGroupBuyProductSpec |
| | | * @serviceCode /groupBuy/updateGroupBuyProductSpec |
| | | * @path /app/groupBuy/updateGroupBuyProductSpec |
| | | */ |
| | | @RequestMapping(value = "/updateGroupBuyProductSpec", method = RequestMethod.POST) |
| | | public ResponseEntity<String> updateGroupBuyProductSpec(@RequestBody JSONObject reqJson) { |
| | |
| | | * |
| | | * @param reqJson |
| | | * @return |
| | | * @serviceCode /groupBuyProductSpec/deleteGroupBuyProductSpec |
| | | * @path /app/groupBuyProductSpec/deleteGroupBuyProductSpec |
| | | * @serviceCode /groupBuy/deleteGroupBuyProductSpec |
| | | * @path /app/groupBuy/deleteGroupBuyProductSpec |
| | | */ |
| | | @RequestMapping(value = "/deleteGroupBuyProductSpec", method = RequestMethod.POST) |
| | | public ResponseEntity<String> deleteGroupBuyProductSpec(@RequestBody JSONObject reqJson) { |
| | |
| | | * |
| | | * @param storeId 小区ID |
| | | * @return |
| | | * @serviceCode /groupBuyProductSpec/queryGroupBuyProductSpec |
| | | * @path /app/groupBuyProductSpec/queryGroupBuyProductSpec |
| | | * @serviceCode /groupBuy/queryGroupBuyProductSpec |
| | | * @path /app/groupBuy/queryGroupBuyProductSpec |
| | | */ |
| | | @RequestMapping(value = "/queryGroupBuyProductSpec", method = RequestMethod.GET) |
| | | public ResponseEntity<String> queryGroupBuyProductSpec(@RequestHeader(value = "store-id") String storeId, |
| | |
| | | * |
| | | * @param reqJson |
| | | * @return |
| | | * @serviceCode /groupBuyBatch/saveGroupBuyBatch |
| | | * @path /app/groupBuyBatch/saveGroupBuyBatch |
| | | * @serviceCode /groupBuy/saveGroupBuyBatch |
| | | * @path /app/groupBuy/saveGroupBuyBatch |
| | | */ |
| | | @RequestMapping(value = "/saveGroupBuyBatch", method = RequestMethod.POST) |
| | | public ResponseEntity<String> saveGroupBuyBatch(@RequestBody JSONObject reqJson, @RequestHeader(value = "store-id") String storeId) { |
| | |
| | | * |
| | | * @param reqJson |
| | | * @return |
| | | * @serviceCode /groupBuyBatch/updateGroupBuyBatch |
| | | * @path /app/groupBuyBatch/updateGroupBuyBatch |
| | | * @serviceCode /groupBuy/updateGroupBuyBatch |
| | | * @path /app/groupBuy/updateGroupBuyBatch |
| | | */ |
| | | @RequestMapping(value = "/updateGroupBuyBatch", method = RequestMethod.POST) |
| | | public ResponseEntity<String> updateGroupBuyBatch(@RequestBody JSONObject reqJson, @RequestHeader(value = "store-id") String storeId) { |
| | |
| | | * |
| | | * @param reqJson |
| | | * @return |
| | | * @serviceCode /groupBuyBatch/deleteGroupBuyBatch |
| | | * @path /app/groupBuyBatch/deleteGroupBuyBatch |
| | | * @serviceCode /groupBuy/deleteGroupBuyBatch |
| | | * @path /app/groupBuy/deleteGroupBuyBatch |
| | | */ |
| | | @RequestMapping(value = "/deleteGroupBuyBatch", method = RequestMethod.POST) |
| | | public ResponseEntity<String> deleteGroupBuyBatch(@RequestBody JSONObject reqJson, @RequestHeader(value = "store-id") String storeId) { |
| | |
| | | * |
| | | * @param storeId 小区ID |
| | | * @return |
| | | * @serviceCode /groupBuyBatch/queryGroupBuyBatch |
| | | * @path /app/groupBuyBatch/queryGroupBuyBatch |
| | | * @serviceCode /groupBuy/queryGroupBuyBatch |
| | | * @path /app/groupBuy/queryGroupBuyBatch |
| | | */ |
| | | @RequestMapping(value = "/queryGroupBuyBatch", method = RequestMethod.GET) |
| | | public ResponseEntity<String> queryGroupBuyBatch(@RequestHeader(value = "store-id") String storeId, |