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

2020年11月5日 17:28:02

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