| | |
| | | import com.yeshi.fanli.service.inter.user.UserRankService;
|
| | | import com.yeshi.fanli.service.inter.user.integral.IntegralDetailService;
|
| | | import com.yeshi.fanli.service.inter.user.invite.ThreeSaleSerivce;
|
| | | import com.yeshi.fanli.service.inter.user.invite.UserInviteValidRecordService;
|
| | | import com.yeshi.fanli.service.inter.user.tb.UserExtraTaoBaoInfoService;
|
| | | import com.yeshi.fanli.service.inter.user.vip.UserVIPInfoService;
|
| | | import com.yeshi.fanli.tag.PageEntity;
|
| | |
| | | shopGoods.setGoodsClass(banLiShopGoodsClassService.selectByPrimaryKey(goodsClass.getId()));
|
| | | }
|
| | | }
|
| | | |
| | |
|
| | | long count = banLiShopGoodsService.countGoods(key, state);
|
| | |
|
| | |
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("删除失败"));
|
| | | }
|
| | | }
|
| | | |
| | | |
| | | /**
|
| | | * 修改状态
|
| | | * @param callback
|
| | | * @param id
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "switchState")
|
| | | public void switchState(String callback, Long id, PrintWriter out) {
|
| | | try {
|
| | | banLiShopGoodsService.switchState(id);
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("操作成功"));
|
| | | } catch (BanLiShopGoodsException e) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(e.getMsg()));
|
| | | } catch (Exception e) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("操作失败"));
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | | |
| | | }
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | /**
|
| | | * 修改状态
|
| | | * @param callback
|
| | | * @param id
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "switchState")
|
| | | public void switchState(String callback, Long id, PrintWriter out) {
|
| | | try {
|
| | | banLiShopGoodsSetService.switchState(id);
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("操作成功"));
|
| | | } catch (BanLiShopGoodsSetException e) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(e.getMsg()));
|
| | | } catch (Exception e) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("操作失败"));
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | | |
| | | /**
|
| | | * 删除
|
| | | * @param callback
|
| | |
| | | <if test="state != null">#{state,jdbcType=INTEGER},</if>
|
| | | <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if>
|
| | | <if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if>
|
| | | <if test="weight != null">#{weight,jdbcType=INTEGER}</if>
|
| | | <if test="weight != null">#{weight,jdbcType=INTEGER},</if>
|
| | | <if test="squarePicture != null">#{squarePicture,jdbcType=VARCHAR}</if>
|
| | | </trim>
|
| | | </insert>
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | |
| | | @Override
|
| | | public void switchState(Long id) throws BanLiShopGoodsException {
|
| | | if (id == null) {
|
| | | throw new BanLiShopGoodsException(1, "请传递正确参数");
|
| | | }
|
| | | BanLiShopGoods resultObj = banLiShopGoodsMapper.selectByPrimaryKey(id);
|
| | | if (resultObj == null) {
|
| | | throw new BanLiShopGoodsException(1, "此内容已不存在");
|
| | | }
|
| | | |
| | | Integer state = resultObj.getState();
|
| | | if (state == null || state == 0) {
|
| | | state = 1;
|
| | | } else {
|
| | | state = 0;
|
| | | }
|
| | | |
| | | BanLiShopGoods updateObj = new BanLiShopGoods();
|
| | | updateObj.setId(id);
|
| | | updateObj.setState(state);
|
| | | banLiShopGoodsMapper.updateByPrimaryKeySelective(updateObj);
|
| | | }
|
| | | |
| | | |
| | |
|
| | | /**
|
| | | * 上传图片
|
| | |
| | | deleteByPrimaryKey(id);
|
| | |
|
| | | }
|
| | | |
| | | |
| | | |
| | |
|
| | | @Transactional
|
| | | @Override
|
| | |
| | | }
|
| | |
|
| | |
|
| | |
|
| | | @Override
|
| | | public void switchState(Long id) throws BanLiShopGoodsSetException {
|
| | | if (id == null) {
|
| | | throw new BanLiShopGoodsSetException(1, "请传递正确参数");
|
| | | }
|
| | | BanLiShopGoodsSets resultObj = banLiShopGoodsSetsMapper.selectByPrimaryKey(id);
|
| | | if (resultObj == null) {
|
| | | throw new BanLiShopGoodsSetException(1, "此内容已不存在");
|
| | | }
|
| | | |
| | | Integer state = resultObj.getState();
|
| | | if (state == null || state == 0) {
|
| | | state = 1;
|
| | | } else {
|
| | | state = 0;
|
| | | }
|
| | | |
| | | BanLiShopGoodsSets updateObj = new BanLiShopGoodsSets();
|
| | | updateObj.setId(id);
|
| | | updateObj.setState(state);
|
| | | banLiShopGoodsSetsMapper.updateByPrimaryKeySelective(updateObj);
|
| | | }
|
| | | |
| | | @Override
|
| | | public void updateSelectiveByPrimaryKey(BanLiShopGoodsSets set) {
|
| | | if (set.getId() == null)
|
| | |
| | | info.setId(userInfo.getId());
|
| | | info.setState(UserVIPInfo.STATE_INVALID);
|
| | | info.setUpdateTime(new Date());
|
| | | info.setBeiZhu(reason);
|
| | | userVIPInfoMapper.updateByPrimaryKeySelective(info);
|
| | | // 消息
|
| | | userAccountMsgNotificationService.vipUpgradeFail(uid, reason);
|
| | |
| | | */
|
| | | public void saveObject(MultipartFile file, MultipartFile file2, BanLiShopGoods record)
|
| | | throws BanLiShopGoodsException, Exception;
|
| | |
|
| | | |
| | | /**
|
| | | * 状态切换
|
| | | * @param id
|
| | | * @throws BanLiShopGoodsSetException
|
| | | */
|
| | | public void switchState(Long id) throws BanLiShopGoodsException;
|
| | |
|
| | |
|
| | | }
|
| | |
| | | */
|
| | | public void saveObject(BanLiShopGoodsSets record) throws BanLiShopGoodsSetException;
|
| | |
|
| | | |
| | | /**
|
| | | * 状态切换
|
| | | * @param id
|
| | | * @throws BanLiShopGoodsSetException
|
| | | */
|
| | | public void switchState(Long id) throws BanLiShopGoodsSetException;
|
| | |
|
| | | }
|