提交 207c0bb1 authored 作者: zgy's avatar zgy

修改bug

上级 9495e71d
...@@ -211,4 +211,6 @@ public class TbCfStationItemController { ...@@ -211,4 +211,6 @@ public class TbCfStationItemController {
} }
} }
...@@ -470,4 +470,5 @@ public class TbCfStationItemServiceImpl implements TbCfStationItemService { ...@@ -470,4 +470,5 @@ public class TbCfStationItemServiceImpl implements TbCfStationItemService {
} }
...@@ -187,7 +187,7 @@ ...@@ -187,7 +187,7 @@
from tb_cf_station_item from tb_cf_station_item
where enable_flag=1 and item_category = #{categoryId} where enable_flag=1 and item_category = #{categoryId}
order by order by
<if test="order != null">item_price ${order},</if> <if test="order != null">discount_price ${order},</if>
item_num desc item_num desc
...@@ -237,7 +237,7 @@ ...@@ -237,7 +237,7 @@
concat('%',#{name},'%') concat('%',#{name},'%')
or item_tags like concat('%',#{name},'%')) or item_tags like concat('%',#{name},'%'))
<if test="order != null "> <if test="order != null ">
order by item_price ${order} order by discount_price ${order}
</if> </if>
</select> </select>
<select id="queryItemByDescription" resultType="com.diaoyun.zion.chinafrica.entity.TbCfStationItemEntity"> <select id="queryItemByDescription" resultType="com.diaoyun.zion.chinafrica.entity.TbCfStationItemEntity">
......
...@@ -29,6 +29,7 @@ import net.sf.json.JSONObject; ...@@ -29,6 +29,7 @@ import net.sf.json.JSONObject;
import org.apache.commons.lang3.RandomStringUtils; import org.apache.commons.lang3.RandomStringUtils;
import org.apache.http.Consts; import org.apache.http.Consts;
import org.apache.http.HttpRequest; import org.apache.http.HttpRequest;
import org.junit.After;
import org.junit.Test; import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import springfox.documentation.spring.web.json.Json; import springfox.documentation.spring.web.json.Json;
...@@ -240,9 +241,19 @@ public class PayTest { ...@@ -240,9 +241,19 @@ public class PayTest {
@Test @Test
public void testString() { public void testString() {
String urls = "[\"https://diaosaas-prod.oss-cn-shenzhen.aliyuncs.com/africa-shop/null/157864293680710851.png\",\"https://diaosaas-prod.oss-cn-shenzhen.aliyuncs.com/africa-shop/null/157864293681310503.png\",\"https://diaosaas-prod.oss-cn-shenzhen.aliyuncs.com/africa-shop/null/157864293680810696.png\",\"https://diaosaas-prod.oss-cn-shenzhen.aliyuncs.com/africa-shop/null/157864293681610328.png\",\"https://diaosaas-prod.oss-cn-shenzhen.aliyuncs.com/africa-shop/null/157864293680510821.png\"]"; String urls = "[\"https://diaosaas-prod.oss-cn-shenzhen.aliyuncs.com/africa-shop/null/157864293680710851.png\",\"https://diaosaas-prod.oss-cn-shenzhen.aliyuncs.com/africa-shop/null/157864293681310503.png\",\"https://diaosaas-prod.oss-cn-shenzhen.aliyuncs.com/africa-shop/null/157864293680810696.png\",\"https://diaosaas-prod.oss-cn-shenzhen.aliyuncs.com/africa-shop/null/157864293681610328.png\",\"https://diaosaas-prod.oss-cn-shenzhen.aliyuncs.com/africa-shop/null/157864293680510821.png\"]";
String str = urls.substring(1,urls.lastIndexOf("]")); String str = urls.substring(1, urls.lastIndexOf("]"));
String s = str.replace("\"", ""); String s = str.replace("\"", "");
System.out.println(s); System.out.println(s);
} }
@Test
public void testCode() {
String code="code";
int i = code.hashCode();
System.out.println(i*17);
// System.out.println((int)((Math.random()*7+1)*10000000));
}
} }
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论