| | |
| | | import com.google.gson.Gson;
|
| | | import com.google.gson.GsonBuilder;
|
| | | import com.google.gson.reflect.TypeToken;
|
| | | import com.yeshi.fanli.entity.shop.BanLiShopGoodsSets;
|
| | | import com.yeshi.fanli.entity.shop.BanLiShopGoodsSetsPay;
|
| | | import com.yeshi.fanli.exception.shop.BanLiShopGoodsSetPayException;
|
| | | import com.yeshi.fanli.service.inter.shop.BanLiShopGoodsSetPayService;
|
| | | import com.yeshi.fanli.service.inter.shop.BanLiShopGoodsSetService;
|
| | | import com.yeshi.fanli.tag.PageEntity;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | |
| | | @Resource
|
| | | private BanLiShopGoodsSetPayService banLiShopGoodsSetPayService;
|
| | |
|
| | | @Resource
|
| | | private BanLiShopGoodsSetService banLiShopGoodsSetService;
|
| | | |
| | |
|
| | | @RequestMapping(value = "save")
|
| | | public void save(String callback, BanLiShopGoodsSetsPay record, HttpServletRequest request, PrintWriter out) {
|
| | | try {
|
| | | banLiShopGoodsSetPayService.addSetPay(record);
|
| | | banLiShopGoodsSetPayService.saveObject(record);
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("保存成功"));
|
| | | } catch (BanLiShopGoodsSetPayException e) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(e.getMsg()));
|
| | |
| | | return;
|
| | | }
|
| | |
|
| | | for (BanLiShopGoodsSetsPay setsPay: list) {
|
| | | BanLiShopGoodsSets goodsSet = setsPay.getGoodsSet();
|
| | | if (goodsSet != null) {
|
| | | setsPay.setGoodsSet(banLiShopGoodsSetService.selectByPrimaryKey(goodsSet.getId()));
|
| | | }
|
| | | }
|
| | | |
| | | long count = banLiShopGoodsSetPayService.countQuery(key, payType, setId);
|
| | |
|
| | | int totalPage = (int) (count % pageSize == 0 ? count / pageSize : count / pageSize + 1);
|