Commit 9a62e01a authored by 黎聪聪's avatar 黎聪聪

2020年11月5日 17:28:02

parent 1cc64067
...@@ -24,5 +24,5 @@ public interface ConsultSheetMapper extends GenericDao<ConsultSheet> { ...@@ -24,5 +24,5 @@ public interface ConsultSheetMapper extends GenericDao<ConsultSheet> {
List<ConsultSheet> fetchSearchByPage(Conds conds, Sort sort, int page, int pageSize, Long id); List<ConsultSheet> fetchSearchByPage(Conds conds, Sort sort, int page, int pageSize, Long id);
List<ConsultSheet> consultSheetList(@Param("name") String name,@Param("id")Long id); List<ConsultSheet> consultSheetList(@Param("name") String name,@Param("id")Long id,@Param("openid") String openid);
} }
\ No newline at end of file
...@@ -202,12 +202,16 @@ ...@@ -202,12 +202,16 @@
<include refid="sqlCol"/> <include refid="sqlCol"/>
from t_aidea_consult_sheet from t_aidea_consult_sheet
where del_flag = 0 where del_flag = 0
<if test="openid!=null">
and open_id = {openid}
</if>
<if test="name!=null"> <if test="name!=null">
and user_name like concat('%',#{name},'%') and user_name like concat('%',#{name},'%')
</if> </if>
<if test="id!=null"> <if test="id!=null">
and id = #{id} and id = #{id}
</if> </if>
ORDER BY create_time
</select> </select>
<update id="update" parameterType="com.cftech.consultsheet.model.ConsultSheet"> <update id="update" parameterType="com.cftech.consultsheet.model.ConsultSheet">
......
...@@ -35,7 +35,7 @@ public interface ConsultSheetService extends GenericService<ConsultSheet> { ...@@ -35,7 +35,7 @@ public interface ConsultSheetService extends GenericService<ConsultSheet> {
* @Param * @Param
* @return * @return
**/ **/
JSONObject consultSheetList(String name,Long id,String appId); JSONObject consultSheetList(String name,Long id,String appId, String openid);
void sendQyWechatMassage(ConsultSheet consultSheet); void sendQyWechatMassage(ConsultSheet consultSheet);
} }
...@@ -117,14 +117,14 @@ public class ConsultSheetServiceImpl extends GenericServiceImpl<ConsultSheet> im ...@@ -117,14 +117,14 @@ public class ConsultSheetServiceImpl extends GenericServiceImpl<ConsultSheet> im
} }
@Override @Override
public JSONObject consultSheetList(String name, Long id, String appId) { public JSONObject consultSheetList(String name, Long id, String appId,String openid) {
JSONObject rtnJson = new JSONObject(); JSONObject rtnJson = new JSONObject();
try { try {
MpAccountsEntity mpAccountsAppid = mpAccountsService.getMpAccountsAppid(appId); MpAccountsEntity mpAccountsAppid = mpAccountsService.getMpAccountsAppid(appId);
if (StringUtils.isBlank(name)) { if (StringUtils.isBlank(name)) {
name = null; name = null;
} }
List<ConsultSheet> consultSheets = consultSheetMapper.consultSheetList(name, id); List<ConsultSheet> consultSheets = consultSheetMapper.consultSheetList(name, id,openid);
if (consultSheets != null) { if (consultSheets != null) {
rtnJson.put("errerNo", 0); rtnJson.put("errerNo", 0);
rtnJson.put("data", consultSheets); rtnJson.put("data", consultSheets);
......
...@@ -38,8 +38,8 @@ public class MobileConsultSheetController { ...@@ -38,8 +38,8 @@ public class MobileConsultSheetController {
@RequestMapping(value = "/consultSheetList", @RequestMapping(value = "/consultSheetList",
method = {RequestMethod.GET, RequestMethod.POST}, method = {RequestMethod.GET, RequestMethod.POST},
produces = MediaType.APPLICATION_JSON_UTF8_VALUE) produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public JSONObject consultSheetList(String name, Long id,String appId) { public JSONObject consultSheetList(String name,Long id,String appId,String openid) {
return consultSheetService.consultSheetList(name, id, appId); return consultSheetService.consultSheetList(name, id, appId,openid);
} }
@RequestMapping(value = "/test", @RequestMapping(value = "/test",
......
...@@ -61,7 +61,7 @@ public interface OrderMapper extends GenericDao<Order> { ...@@ -61,7 +61,7 @@ public interface OrderMapper extends GenericDao<Order> {
/** /**
* @return * @return
* @Author Licc * @Author Licc
* @Description 根据订单ID查询订单详情 * @Description
* @Date 10:46 2020/11/1 * @Date 10:46 2020/11/1
* @Param * @Param
**/ **/
......
...@@ -226,8 +226,7 @@ ...@@ -226,8 +226,7 @@
#{clerkId, jdbcType=BIGINT} #{clerkId, jdbcType=BIGINT}
) )
</insert> </insert>
<update id="deleteAll" >
<update id="deleteAll">
update t_order_details set del_flag=1 where id=#{id} update t_order_details set del_flag=1 where id=#{id}
</update> </update>
...@@ -390,11 +389,9 @@ ...@@ -390,11 +389,9 @@
<update id="delete" parameterType="java.lang.Long"> <update id="delete" parameterType="java.lang.Long">
update t_order set del_flag=1 where id=#{id,jdbcType=BIGINT} update t_order set del_flag=1 where id=#{id,jdbcType=BIGINT}
</update> </update>
<select id="fetchProduct" resultType="com.cftech.order.model.ProductDto" parameterType="java.util.Map"> <select id="fetchProduct" resultType="com.cftech.order.model.ProductDto" parameterType="java.util.Map">
SELECT * FROM t_aidea_product WHERE id = #{productId} AND accounts_id=#{accountsId} AND del_flag = 0 SELECT * FROM t_aidea_product WHERE id = #{productId} AND accounts_id=#{accountsId} AND del_flag = 0
</select> </select>
<update id="updateDetill" parameterType="java.util.Map"> <update id="updateDetill" parameterType="java.util.Map">
update t_order_details update t_order_details
<set> <set>
...@@ -413,11 +410,9 @@ ...@@ -413,11 +410,9 @@
</set> </set>
where order_id =#{id} and id = #{idDetail} where order_id =#{id} and id = #{idDetail}
</update> </update>
<select id="fetcheDeta" parameterType="java.util.Map" resultType="java.lang.Integer"> <select id="fetcheDeta" parameterType="java.util.Map" resultType="java.lang.Integer">
select * from t_order_details where order_id =#{id} and accounts_id=#{accountsId} and drugs_id =#{productId} and del_flag = 0 select * from t_order_details where order_id =#{id} and accounts_id=#{accountsId} and drugs_id =#{productId} and del_flag = 0
</select> </select>
<insert id="saveDetill" parameterType="com.cftech.order.model.OrderDetailDto"> <insert id="saveDetill" parameterType="com.cftech.order.model.OrderDetailDto">
insert into t_order_details insert into t_order_details
( (
...@@ -436,7 +431,6 @@ ...@@ -436,7 +431,6 @@
#{accountsId} #{accountsId}
) )
</insert> </insert>
<select id="fetchOrder" resultType="com.cftech.order.model.Order" parameterType="java.lang.Long"> <select id="fetchOrder" resultType="com.cftech.order.model.Order" parameterType="java.lang.Long">
select * from t_order where id= #{id} and del_flag = 0 select * from t_order where id= #{id} and del_flag = 0
</select> </select>
...@@ -450,7 +444,6 @@ ...@@ -450,7 +444,6 @@
</set> </set>
where id= #{id} where id= #{id}
</update> </update>
<update id="updateStatus" parameterType="java.lang.Long"> <update id="updateStatus" parameterType="java.lang.Long">
update t_order update t_order
<set> <set>
...@@ -485,13 +478,13 @@ ...@@ -485,13 +478,13 @@
LEFT JOIN area b ON s.city_id = b.areaid LEFT JOIN area b ON s.city_id = b.areaid
LEFT JOIN area c ON s.area_id = c.areaid LEFT JOIN area c ON s.area_id = c.areaid
WHERE t.del_flag=0 WHERE t.del_flag=0
<if test="id"> <if test="id !=null">
AND t.id =#{id} AND t.id =#{id}
</if> </if>
<if test="openid"> <if test="openid !=null">
AND t.openid =#{openid} AND t.openid =#{openid}
</if> </if>
<if test="status!=null"> <if test="status!=null ">
AND t.status =#{status} AND t.status =#{status}
</if> </if>
</select> </select>
...@@ -509,7 +502,7 @@ ...@@ -509,7 +502,7 @@
and t.order_id =#{orderId} and t.order_id =#{orderId}
</if> </if>
</select> </select>
<select id="orderSize" resultType="com.cftech.order.model.OrderSizeVO"> <select id="orderSize" resultType="com.cftech.order.model.OrderSizeVO" >
</select> </select>
......
...@@ -160,6 +160,21 @@ public class OrderServiceImpl extends GenericServiceImpl<Order> implements Order ...@@ -160,6 +160,21 @@ public class OrderServiceImpl extends GenericServiceImpl<Order> implements Order
com.alibaba.fastjson.JSONObject rtnJson = new com.alibaba.fastjson.JSONObject(); com.alibaba.fastjson.JSONObject rtnJson = new com.alibaba.fastjson.JSONObject();
com.alibaba.fastjson.JSONObject object = new com.alibaba.fastjson.JSONObject(); com.alibaba.fastjson.JSONObject object = new com.alibaba.fastjson.JSONObject();
try { try {
if (StringUtils.isEmpty(openid)){
rtnJson.put("errorNo","0");
rtnJson.put("errorMsg","openid不能为空");
return rtnJson;
}
if (status==null){
rtnJson.put("errorNo","0");
rtnJson.put("errorMsg","status不能为空");
return rtnJson;
}
if (id==null){
rtnJson.put("errorNo","0");
rtnJson.put("errorMsg","id不能为空");
return rtnJson;
}
List<OrderMobile> orderMobiles = orderMapper.orderFall(openid, status, id); List<OrderMobile> orderMobiles = orderMapper.orderFall(openid, status, id);
for (OrderMobile orderMobile : orderMobiles) { for (OrderMobile orderMobile : orderMobiles) {
Long mobileId = orderMobile.getId(); Long mobileId = orderMobile.getId();
......
...@@ -5,10 +5,7 @@ import com.cftech.order.service.OrderService; ...@@ -5,10 +5,7 @@ import com.cftech.order.service.OrderService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType; import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.CrossOrigin; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
/** /**
* @author :licc * @author :licc
...@@ -30,7 +27,7 @@ public class MobileOrderController { ...@@ -30,7 +27,7 @@ public class MobileOrderController {
* @return * @return
**/ **/
@RequestMapping(value = "/confirm",method = {RequestMethod.POST},produces = MediaType.APPLICATION_JSON_UTF8_VALUE) @RequestMapping(value = "/confirm",method = {RequestMethod.POST},produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public JSONObject confirm(String openid,Long status,Long id){ public JSONObject confirm(String openid, Long status,Long id){
return orderService.confirm(openid,status,id); return orderService.confirm(openid,status,id);
} }
// /** // /**
......
...@@ -237,7 +237,7 @@ ...@@ -237,7 +237,7 @@
</if> </if>
<if test="classifyName !=null"> <if test="classifyName !=null">
and and
c.id = #{classifyName} c.classify_name = #{classifyName}
</if> </if>
<if test="dosagaFrom !=null"> <if test="dosagaFrom !=null">
...@@ -246,6 +246,9 @@ ...@@ -246,6 +246,9 @@
</if> </if>
GROUP by t.id GROUP by t.id
ORDER BY
t.create_time
DESC
</select> </select>
<!--商品分类菜单数据回填!--> <!--商品分类菜单数据回填!-->
<select id="productMenu" resultType="com.cftech.productclassify.model.ProductMenuVO"> <select id="productMenu" resultType="com.cftech.productclassify.model.ProductMenuVO">
...@@ -275,6 +278,7 @@ ...@@ -275,6 +278,7 @@
product_img AS productImg product_img AS productImg
FROM t_aidea_product FROM t_aidea_product
WHERE size= 1 and del_flag = 0 WHERE size= 1 and del_flag = 0
ORDER BY create_time desc
LIMIT 0,4 LIMIT 0,4
</select> </select>
<select id="productDosage" resultType="com.cftech.productclassify.model.ProductVO"> <select id="productDosage" resultType="com.cftech.productclassify.model.ProductVO">
......
...@@ -26,7 +26,7 @@ public class MobileclassifyController { ...@@ -26,7 +26,7 @@ public class MobileclassifyController {
* @return * @return
**/ **/
@RequestMapping(value = "/productList",method = {RequestMethod.GET,RequestMethod.POST},produces = MediaType.APPLICATION_JSON_UTF8_VALUE) @RequestMapping(value = "/productList",method = {RequestMethod.GET,RequestMethod.POST},produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public JSONObject productList(String productName, String classifyName, String dosagaFrom,String appId){ public JSONObject productList(@RequestParam(required = false) String productName, @RequestParam(required = false)String classifyName,@RequestParam(required = false) String dosagaFrom,@RequestParam(required = true)String appId){
return ProductclassifyService.productList(productName,classifyName,dosagaFrom,appId); return ProductclassifyService.productList(productName,classifyName,dosagaFrom,appId);
} }
/** /**
...@@ -65,7 +65,7 @@ public class MobileclassifyController { ...@@ -65,7 +65,7 @@ public class MobileclassifyController {
} }
/** /**
* @Author Licc * @Author Licc
* @Description 热门推荐 * @Description 好药推荐
* @Date 19:40 2020/11/2 * @Date 19:40 2020/11/2
* @Param * @Param
* @return * @return
......
...@@ -172,11 +172,6 @@ public class ProductServiceImpl extends GenericServiceImpl<Product> implements P ...@@ -172,11 +172,6 @@ public class ProductServiceImpl extends GenericServiceImpl<Product> implements P
public JSONObject productId(Long id,String appId) { public JSONObject productId(Long id,String appId) {
JSONObject rtnJson = new JSONObject(); JSONObject rtnJson = new JSONObject();
try { try {
if (id==null){
rtnJson.put("errorNO","1");
rtnJson.put("errorMsg","id不能为空");
return rtnJson;
}
List<ProductVO> product = productMapper.product(id); List<ProductVO> product = productMapper.product(id);
if (product==null){ if (product==null){
rtnJson.put("errorNO","1"); rtnJson.put("errorNO","1");
......
...@@ -5,10 +5,7 @@ import com.cftech.product.service.ProductService; ...@@ -5,10 +5,7 @@ import com.cftech.product.service.ProductService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType; import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.CrossOrigin; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import sun.util.resources.cldr.gv.LocaleNames_gv; import sun.util.resources.cldr.gv.LocaleNames_gv;
/** /**
...@@ -33,7 +30,7 @@ public class MobileProductController { ...@@ -33,7 +30,7 @@ public class MobileProductController {
* @return * @return
**/ **/
@RequestMapping(value = "/productId",method = {RequestMethod.GET, RequestMethod.POST},produces = MediaType.APPLICATION_JSON_UTF8_VALUE) @RequestMapping(value = "/productId",method = {RequestMethod.GET, RequestMethod.POST},produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public JSONObject productMenu(Long id,String appId){ public JSONObject productMenu(@RequestParam(required = true) Long id, @RequestParam(required = true) String appId){
return productService.productId(id,appId); return productService.productId(id,appId);
} }
......
...@@ -990,7 +990,6 @@ ...@@ -990,7 +990,6 @@
type: "POST", type: "POST",
data: {_csrf_header: csrfheader.value, _csrf: csrftoken.value}, data: {_csrf_header: csrfheader.value, _csrf: csrftoken.value},
success: function (rsp) { success: function (rsp) {
if (rsp.errorNo == "0") { if (rsp.errorNo == "0") {
if (rsp.data >= 4) { if (rsp.data >= 4) {
Cfapp.alert({ Cfapp.alert({
...@@ -1000,7 +999,6 @@ ...@@ -1000,7 +999,6 @@
location.href = "#springUrl('/a/cfarticle/list')"; location.href = "#springUrl('/a/cfarticle/list')";
} }
}); });
} else { } else {
Cfapp.confirm({ Cfapp.confirm({
message: "是否确认推荐", message: "是否确认推荐",
...@@ -1063,6 +1061,7 @@ ...@@ -1063,6 +1061,7 @@
} }
function save() { function save() {
$('#myModal').modal('hide')
var datas = []; var datas = [];
var counta = 0; var counta = 0;
var countb = 0; var countb = 0;
......
...@@ -213,6 +213,11 @@ String unCond = HtmlUtils.htmlUnescape(contents); ...@@ -213,6 +213,11 @@ String unCond = HtmlUtils.htmlUnescape(contents);
public JSONObject columnDetails(Long id,String appId) { public JSONObject columnDetails(Long id,String appId) {
JSONObject rtnJson = new JSONObject(); JSONObject rtnJson = new JSONObject();
try { try {
if (id==null){
rtnJson.put("errorNo", "1");
rtnJson.put("errorMsg","id不能为空");
return rtnJson;
}
MpAccountsEntity mpAccountsAppid = mpAccountsService.getMpAccountsAppid(appId); MpAccountsEntity mpAccountsAppid = mpAccountsService.getMpAccountsAppid(appId);
List<CfarticleVO> cfarticleVOS = cfarticleMapper.columnDetails(id); List<CfarticleVO> cfarticleVOS = cfarticleMapper.columnDetails(id);
if (cfarticleVOS==null){ if (cfarticleVOS==null){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment