| | |
| | | e.printStackTrace();
|
| | | }
|
| | |
|
| | | LogHelper.test("美洽:body----" + sb.toString());
|
| | |
|
| | | String sign = "";
|
| | | try {
|
| | | sign = sign(sb.toString());
|
| | |
| | | "android".equalsIgnoreCase(deviceOS) ? 1 : 2, 1, msg, new Date());
|
| | | }
|
| | |
|
| | | LogHelper.test("美洽:body----" + sb.toString());
|
| | | |
| | | }
|
| | |
|
| | | public String sign(String raw_body) throws java.security.SignatureException {
|
| | |
| | | @Resource
|
| | | private BrandClassShopService brandClassShopService;
|
| | |
|
| | | |
| | | /**
|
| | | * 保存信息
|
| | | *
|
| | |
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | | /**
|
| | | * 修改排序
|
| | |
| | | }
|
| | | }
|
| | |
|
| | |
|
| | | |
| | | /**
|
| | | * 查询
|
| | | * |
| | | * @param callback
|
| | | * @param pageIndex
|
| | | * @param pageSize
|
| | | * @param key 模糊查询:说明、标识
|
| | | * @param key
|
| | | * 模糊查询:说明、标识
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "query")
|
| | | public void query(String callback, Integer pageIndex, Integer pageSize, String key,
|
| | | Integer state, PrintWriter out) {
|
| | | public void query(String callback, Integer pageIndex, Integer pageSize, String key, Integer state,
|
| | | PrintWriter out) {
|
| | |
|
| | | if (pageIndex == null || pageIndex < 1) {
|
| | | pageIndex = 1;
|
| | |
| | | }
|
| | | }
|
| | |
|
| | |
|
| | | /**
|
| | | * 删除
|
| | | * |
| | | * @param callback
|
| | | * @param idArray
|
| | | * @param out
|
| | |
| | | return;
|
| | | }
|
| | | Gson gson = new Gson();
|
| | | List<Long> list = gson.fromJson(idArray, new TypeToken<ArrayList<Long>>() {}.getType());
|
| | | List<Long> list = gson.fromJson(idArray, new TypeToken<ArrayList<Long>>() {
|
| | | }.getType());
|
| | |
|
| | | if (list == null || list.size() == 0) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("未检测到删除的数据"));
|
| | |
| | |
|
| | | /**
|
| | | * 筛选列表
|
| | | * |
| | | * @param callback
|
| | | * @param out
|
| | | */
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | |
| | | |
| | | /**
|
| | | * 查询
|
| | | * |
| | | * @param callback
|
| | | * @param pageIndex
|
| | | * @param pageSize
|
| | | * @param key 模糊查询:说明、标识
|
| | | * @param key
|
| | | * 模糊查询:说明、标识
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "queryTaoBaoShop")
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | |
| | | /**
|
| | | * 添加店铺入库
|
| | | *
|
| | |
| | | return;
|
| | | }
|
| | | Gson gson = new Gson();
|
| | | List<Long> list = gson.fromJson(idArray, new TypeToken<ArrayList<Long>>() {}.getType());
|
| | | List<Long> list = gson.fromJson(idArray, new TypeToken<ArrayList<Long>>() {
|
| | | }.getType());
|
| | |
|
| | | String shopIds = brandClassShopService.saveShopInfo(cid,list);
|
| | | if (StringUtil.isNullOrEmpty(shopIds)) {
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | |
| | |
|
| | | /**
|
| | | * 查询
|
| | | * |
| | | * @param callback
|
| | | * @param pageIndex
|
| | | * @param pageSize
|
| | | * @param key 模糊查询:说明、标识
|
| | | * @param key
|
| | | * 模糊查询:说明、标识
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "queryClassShop")
|
| | | public void queryClassShop(String callback, Integer pageIndex, Integer pageSize, String key,
|
| | | Long cid , Integer state, PrintWriter out) {
|
| | | public void queryClassShop(String callback, Integer pageIndex, Integer pageSize, String key, Long cid,
|
| | | Integer state, PrintWriter out) {
|
| | |
|
| | | if (pageIndex == null || pageIndex < 1) {
|
| | | pageIndex = 1;
|
| | |
| | | }
|
| | |
|
| | | try {
|
| | | List<BrandClassShop> list = brandClassShopService.listQuery((pageIndex - 1) * pageSize, pageSize, key, cid, state);
|
| | | List<BrandClassShop> list = brandClassShopService.listQuery((pageIndex - 1) * pageSize, pageSize, key, cid,
|
| | | state);
|
| | |
|
| | | if (list == null || list.size() == 0) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("暂无数据"));
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | |
| | | /**
|
| | | * 保存信息
|
| | | *
|
| | |
| | | */
|
| | | @RequestMapping(value = "saveClassShop")
|
| | | public void saveClassShop(String callback, Long id, Long cid, String shopName, Integer state, Integer top,
|
| | | HttpServletRequest request, PrintWriter out) {
|
| | | String key, HttpServletRequest request, PrintWriter out) {
|
| | | try {
|
| | | if (request instanceof MultipartHttpServletRequest) {
|
| | | MultipartHttpServletRequest fileRequest = (MultipartHttpServletRequest) request;
|
| | | brandClassShopService.changeShopInfo(fileRequest.getFile("file"), id, cid, shopName, state, top);
|
| | | brandClassShopService.changeShopInfo(fileRequest.getFile("file"), id, cid, shopName, state, top, key);
|
| | | }else{
|
| | | brandClassShopService.changeShopInfo(null, id, cid, shopName, state, top);
|
| | | brandClassShopService.changeShopInfo(null, id, cid, shopName, state, top, key);
|
| | | }
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("保存成功"));
|
| | | } catch (BrandClassShopException e) {
|
| | |
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | | |
| | |
|
| | | /**
|
| | | * 修改排序
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | |
| | | /**
|
| | | * 删除
|
| | | * |
| | | * @param callback
|
| | | * @param idArray
|
| | | * @param out
|
| | |
| | | return;
|
| | | }
|
| | | Gson gson = new Gson();
|
| | | List<Long> list = gson.fromJson(idArray, new TypeToken<ArrayList<Long>>() {}.getType());
|
| | | List<Long> list = gson.fromJson(idArray, new TypeToken<ArrayList<Long>>() {
|
| | | }.getType());
|
| | |
|
| | | if (list == null || list.size() == 0) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("未检测到删除的数据"));
|
| | |
| | | <if test="unReadCount != null">#{unReadCount,jdbcType=INTEGER},</if> |
| | | <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="latestContent != null">#{latestContent,jdbcType=VARCHAR}</if> |
| | | <if test="latestContent != null">#{latestContent,jdbcType=VARCHAR},</if> |
| | | <if test="latestContentTime != null">#{latestContentTime,jdbcType=TIMESTAMP}</if> |
| | | </trim> |
| | | </insert> |
| | |
| | | <select id="getShopByKey" resultMap="BaseResultVOMap" > |
| | | SELECT * FROM (SELECT COUNT(t.`id`) AS totalGoods,po.* FROM yeshi_ec_taobao_shop_info po |
| | | LEFT JOIN `yeshi_ec_taobao_goods` t ON t.`sellerId` = po.`tsi_id` |
| | | WHERE <![CDATA[t.`couponAmount` > 0 AND po.`tsi_key` LIKE '%${key}%' |
| | | WHERE <![CDATA[t.`couponAmount` > 0 AND FIND_IN_SET(#{key},po.`tsi_key`) |
| | | GROUP BY t.`sellerId` HAVING totalGoods> 2]]>)A |
| | | LEFT JOIN (SELECT t.*,po.`tsi_id` FROM yeshi_ec_taobao_shop_info po |
| | | LEFT JOIN `yeshi_ec_taobao_goods` t ON t.`sellerId` = po.`tsi_id` |
| | | WHERE<![CDATA[ t.`couponAmount` > 0 ]]>AND po.`tsi_key` LIKE '%${key}%' |
| | | WHERE<![CDATA[ t.`couponAmount` > 0 ]]>AND FIND_IN_SET(#{key},po.`tsi_key`) |
| | | ORDER BY t.`biz30day` DESC |
| | | LIMIT 3)B ON B.`tsi_id` = A.`tsi_id` |
| | | </select> |
| | |
| | |
|
| | | @Override
|
| | | @Transactional
|
| | | public void changeShopInfo(MultipartFile file, Long id, Long cid, String shopName, Integer state, Integer top)
|
| | | public void changeShopInfo(MultipartFile file, Long id, Long cid, String shopName, Integer state, Integer top,String key)
|
| | | throws BrandClassShopException {
|
| | |
|
| | | if (id == null) {
|
| | |
| | | }
|
| | |
|
| | | // 自定义图片
|
| | | taoBaoShopService.changeInfo(file, shop.getId(), shopName);
|
| | | taoBaoShopService.changeInfo(file, shop.getId(), shopName,key);
|
| | |
|
| | | BrandClassShop updateshop = new BrandClassShop();
|
| | | updateshop.setState(state);
|
| | |
| | | }
|
| | |
|
| | | @Override
|
| | | public void changeInfo(MultipartFile file, Long id, String shopName) {
|
| | | public void changeInfo(MultipartFile file, Long id, String shopName, String key) {
|
| | | TaoBaoShop taoBaoShop = taoBaoShopMapper.selectByPrimaryKey(id);
|
| | | if (taoBaoShop == null) {
|
| | | return;
|
| | |
| | |
|
| | | updateShop.setId(id);
|
| | | updateShop.setShopNameCustom(shopName);
|
| | | updateShop.setKey(key);
|
| | | taoBaoShopMapper.updateByPrimaryKeySelective(updateShop);
|
| | | }
|
| | |
|
| | |
| | | }
|
| | | return shop;
|
| | | }
|
| | |
|
| | |
|
| | | @Override
|
| | | @Cacheable(value = "brandCache", key = "'getShopByKey-'+#key")
|
| | |
| | | * @param state
|
| | | * @throws BrandClassShopException
|
| | | */
|
| | | public void changeShopInfo(MultipartFile file, Long id, Long cid, String shopName, Integer state, Integer top)
|
| | | public void changeShopInfo(MultipartFile file, Long id, Long cid, String shopName, Integer state, Integer top,String key)
|
| | | throws BrandClassShopException;
|
| | |
|
| | |
|
| | |
| | | * @param id
|
| | | * @param shopName
|
| | | */
|
| | | public void changeInfo(MultipartFile file, Long id, String shopName);
|
| | | public void changeInfo(MultipartFile file, Long id, String shopName,String key);
|
| | |
|
| | | /**
|
| | | * 查询店铺信息、并返回钱3个商品数量
|
| | |
| | |
|
| | | public static boolean greaterThan_1_5_50(String platform, String versionCode) {
|
| | | if ((("android".equalsIgnoreCase(platform) && Integer.parseInt(versionCode) >= 42))
|
| | | || (("ios".equalsIgnoreCase(platform) && Integer.parseInt(versionCode) >= 51)))
|
| | | || (("ios".equalsIgnoreCase(platform) && Integer.parseInt(versionCode) >= 52)))
|
| | | return true;
|
| | | else
|
| | | return false;
|