| | |
| | | import com.alibaba.excel.enums.CellExtraTypeEnum; |
| | | import com.alibaba.excel.write.metadata.WriteSheet; |
| | | import com.alibaba.excel.write.style.column.LongestMatchColumnWidthStyleStrategy; |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.panzhihua.common.constants.FtpConstants; |
| | |
| | | if (data==null){ |
| | | return R.fail("Id有误!"); |
| | | } |
| | | String dataStr = JSONObject.toJSONString(data); |
| | | ComMngVolunteerMngAppletsVO oneVolunteerVO = JSONObject.parseObject(dataStr, ComMngVolunteerMngAppletsVO.class); |
| | | ComMngVolunteerMngAppletsVO oneVolunteerVO = JSON.parseObject(JSON.toJSONString(data), ComMngVolunteerMngAppletsVO.class); |
| | | String phone1 = oneVolunteerVO.getPhone(); |
| | | if (ObjectUtils.isEmpty(phone1)) { |
| | | return R.fail("志愿者手机号不能为空"); |
| | |
| | | @Select("<script> " + |
| | | "select id,`name`,store_id,goods_pic,images,`status`,sale,original_price,price,unit" + |
| | | ",`order`,stock,details,delivery_type from com_shop_goods as csg " + |
| | | " where 1=1 and csg.delete_status = 1 and csg.status = 1" + |
| | | " where 1=1 and csg.delete_status = 1 " + |
| | | "<if test='comShopGoodsDTO.name != null and comShopGoodsDTO.name !=""'>" + |
| | | " AND csg.`name` like concat('%',#{comShopGoodsDTO.name},'%') " + |
| | | " </if> " + |
| | | "<if test='comShopGoodsDTO.status != null '>" + |
| | | " AND csg.`status` = #{comShopGoodsDTO.status}" + |
| | | " </if> " + |
| | | "<if test='comShopGoodsDTO.storeId != null '>" + |
| | | " AND csg.store_id = #{comShopGoodsDTO.storeId} " + |
| | | " </if> " + |
| | |
| | | public interface ComShopStoreDAO extends BaseMapper<ComShopStoreDO> { |
| | | |
| | | @Select("<script>" + |
| | | "select id,`name`,store_password,contacts,store_account,classify_id,logo,phone,delivery_type,remark,`status`,sale,sale_volume,store_detail,create_at from com_shop_store c" + |
| | | "select id,`name`,store_password,contacts,store_account,classify_id,logo,phone,delivery_type,remark,`status`," + |
| | | "sale,sale_volume,store_detail,create_at from com_shop_store c" + |
| | | " <where>" + |
| | | "c.delete_status=1" + |
| | | "<if test='pageComShopStoreDTO.contacts != null and pageComShopStoreDTO.contacts.trim() != ""'>" + |
| | | "and c.contacts like concat('%',#{pageComShopStoreDTO.contacts},'%') \n" + |
| | | " </if> " + |
| | |
| | | "and c.status =#{pageComShopStoreDTO.status} \n" + |
| | | " </if> " + |
| | | " </where>" + |
| | | " order by c.create_at desc"+ |
| | | " order by c.create_at desc" + |
| | | "</script>") |
| | | IPage<PageShopStoreVO> pageShopStore(Page page, @Param("pageComShopStoreDTO") PageComShopStoreDTO pageComShopStoreDTO); |
| | | |
| | |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @auther lyq |
| | |
| | | @Override |
| | | public R deleteStore(Long[] id) { |
| | | LambdaQueryWrapper<ComShopStoreDO> query = new LambdaQueryWrapper<ComShopStoreDO>().in(ComShopStoreDO::getId, id); |
| | | ComShopStoreDO comShopStoreDO = this.baseMapper.selectOne(query); |
| | | comShopStoreDO.setDeleteStatus(2); |
| | | int update = this.baseMapper.updateById(comShopStoreDO); |
| | | return update > 0 ? R.ok() : R.fail(); |
| | | List<ComShopStoreDO> comShopStoreDO = this.baseMapper.selectList(query); |
| | | for (ComShopStoreDO shopStoreDO:comShopStoreDO) { |
| | | shopStoreDO.setDeleteStatus(2); |
| | | int update = this.baseMapper.updateById(shopStoreDO); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | @Override |